public function testGetManifestPath() { /** @var Application|\PHPUnit_Framework_MockObject_MockObject $application */ $application = $this->getMock('TQ\\ExtJS\\Application\\Application', array('getDefaultBuild', 'isDevelopment'), array(), '', false); $application->expects($this->once())->method('getDefaultBuild')->willReturn('desktop'); $application->expects($this->once())->method('isDevelopment')->willReturn(false); /** @var UrlGeneratorInterface|\PHPUnit_Framework_MockObject_MockObject $urlGenerator */ $urlGenerator = $this->getMock('Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface', array('generate', 'setContext', 'getContext')); $urlGenerator->expects($this->once())->method('generate')->with($this->equalTo('tq_extjs_application_manifest'), $this->equalTo(['build' => 'desktop', 'dev' => '']))->willReturn('url'); $extension = new TemplatingHelper($urlGenerator, $application); $this->assertEquals('url', $extension->getManifestPath()); }
/** * @param string|null $build * @return string */ public function getManifestPath($build = null) { return $this->templatingHelper->getManifestPath($build); }