public function testTranslatorSingleValue() { $translator = new Translator(Translator::AN_ARRAY, $this->translatorStrings, 'de_DE'); $processor = new TranslatorProcessor($translator); $word = 'one dog'; $this->assertEquals('ein Hund', $processor->processValue($word)); }
public function testTranslatorSingleValue() { $translator = new Translator(); $translator->addTranslationFile('phparray', $this->translatorFile); $processor = new TranslatorProcessor($translator); $this->assertEquals('ein Hund', $processor->processValue('one dog')); }
public function testTranslatorSingleValueWithoutIntl() { if (extension_loaded('intl')) { $this->markTestSkipped('ext/intl enabled'); } $this->setExpectedException('Zend\\I18n\\Exception\\ExtensionNotLoadedException', 'Zend\\I18n\\Translator component requires the intl PHP extension'); $translator = new Translator(); $translator->addTranslationFile('phparray', $this->translatorFile); $processor = new TranslatorProcessor($translator); $this->assertEquals('ein Hund', $processor->processValue('one dog')); }