public function testTransChoiceFallbackIsLogged() { $logger = $this->getMock('Psr\\Log\\LoggerInterface'); $logger->expects($this->once())->method('debug')->with('Translation use fallback catalogue.'); $translator = new Translator('ar'); $translator->setFallbackLocales(array('en')); $translator->addLoader('array', new ArrayLoader()); $translator->addResource('array', array('some_message2' => 'one thing|%count% things'), 'en'); $loggableTranslator = new LoggingTranslator($translator, $logger); $loggableTranslator->transChoice('some_message2', 10, array('%count%' => 10)); }
/** * {@inheritdoc} */ public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) { $parentValue = parent::transChoice($id, $number, $parameters, $domain, $locale); return $parentValue; }