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')); }