Definition at line 14 of file FileCachingTest.php.
◆ setUp()
Twig_Tests_FileCachingTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 19 of file FileCachingTest.php.
21 $this->tmpDir = sys_get_temp_dir().
'/TwigTests';
22 if (!file_exists($this->tmpDir)) {
23 @mkdir($this->tmpDir, 0777,
true);
26 if (!is_writable($this->tmpDir)) {
27 $this->markTestSkipped(sprintf(
'Unable to run the tests as "%s" is not writable.', $this->tmpDir));
Stores the Twig configuration.
Loads a template from an array.
◆ tearDown()
Twig_Tests_FileCachingTest::tearDown |
( |
| ) |
|
|
protected |
◆ testClearingCacheFiles()
Twig_Tests_FileCachingTest::testClearingCacheFiles |
( |
| ) |
|
legacy
Definition at line 53 of file FileCachingTest.php.
References $name.
56 $this->env->loadTemplate(
$name);
57 $cacheFileName = $this->env->getCacheFilename(
$name);
59 $this->assertFileExists($cacheFileName,
'Cache file does not exist.');
60 $this->env->clearCacheFiles();
61 $this->assertFileNotExists($cacheFileName,
'Cache file was not cleared.');
◆ testWritingCacheFiles()
Twig_Tests_FileCachingTest::testWritingCacheFiles |
( |
| ) |
|
legacy
Definition at line 41 of file FileCachingTest.php.
References $name.
44 $this->env->loadTemplate(
$name);
45 $cacheFileName = $this->env->getCacheFilename(
$name);
47 $this->assertFileExists($cacheFileName,
'Cache file does not exist.');
◆ $env
Twig_Tests_FileCachingTest::$env |
|
private |
◆ $tmpDir
Twig_Tests_FileCachingTest::$tmpDir |
|
private |
The documentation for this class was generated from the following file: