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