protected function getTranslatorMock() { if (!isset($this->translatorMock)) { $this->translatorMock = $this->getMock('Symfony\\Component\\Translation\\TranslatorInterface'); } return $this->translatorMock; }