public function Twig_Tests_FileCachingTest::testClearingCacheFiles

File

drupal/core/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php, line 42

Class

Twig_Tests_FileCachingTest

Code

public function testClearingCacheFiles() {
  $name = 'I will be deleted.';
  $template = $this->env
    ->loadTemplate($name);
  $cacheFileName = $this->env
    ->getCacheFilename($name);
  $this
    ->assertTrue(file_exists($cacheFileName), 'Cache file does not exist.');
  $this->env
    ->clearCacheFiles();
  $this
    ->assertFalse(file_exists($cacheFileName), 'Cache file was not cleared.');
}