public function testWarmUpEmpty() { $this->templateFinder->expects($this->once())->method('findAllTemplates')->will($this->returnValue(array())); $this->fileLocator->expects($this->never())->method('locate'); $warmer = new TemplatePathsCacheWarmer($this->templateFinder, $this->templateLocator); $warmer->warmUp($this->tmpDir); $this->assertFileExists($this->tmpDir . '/templates.php'); $this->assertSame(file_get_contents(__DIR__ . '/../Fixtures/TemplatePathsCache/templates-empty.php'), file_get_contents($this->tmpDir . '/templates.php')); }
/** * Constructor. * * @param TemplateFinderInterface $finder A template finder * @param TemplateLocator $locator The template locator */ public function __construct(TemplateFinderInterface $finder, TemplateLocator $locator, ActiveTheme $activeTheme = null) { $this->activeTheme = $activeTheme; parent::__construct($finder, $locator); }
/** * Constructor. * * @param TemplateFinderInterface $finder A template finder * @param TemplateLocator $locator The template locator */ public function __construct(TemplateFinderInterface $finder, TemplateLocator $locator, ThemeManager $themeManager = null) { $this->themeManager = $themeManager; parent::__construct($finder, $locator); }