public function testDumpTranslations() { $routeMock = $this->getMockBuilder('Symfony\\Component\\Routing\\Route')->disableOriginalConstructor()->getMock(); $routeMock->expects($this->once())->method('getPath')->will($this->returnValue('/tmp/test{_locale}')); $routeCollectionMock = $this->getMock('Symfony\\Component\\Routing\\RouteCollection'); $routeCollectionMock->expects($this->once())->method('get')->will($this->returnValue($routeMock)); $this->routerMock->expects($this->once())->method('getRouteCollection')->will($this->returnValue($routeCollectionMock)); $this->logger->expects($this->once())->method('info'); $this->translationControllerMock->expects($this->once())->method('renderJsTranslationContent')->will($this->returnValue('test')); $this->dumper->dumpTranslations(); }
/** * Sets a logger * * @param LoggerInterface $logger */ public function setLogger(LoggerInterface $logger) { $this->logger = $logger; $this->adapter->setLogger($this->logger); $this->jsTranslationDumper->setLogger($this->logger); }