diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CacheTest.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/CacheTest.php b/tests/CacheTest.php index eacd4487..26c43225 100644 --- a/tests/CacheTest.php +++ b/tests/CacheTest.php | |||
@@ -30,7 +30,7 @@ class CacheTest extends PHPUnit_Framework_TestCase | |||
30 | } else { | 30 | } else { |
31 | array_map('unlink', glob(self::$testCacheDir.'/*')); | 31 | array_map('unlink', glob(self::$testCacheDir.'/*')); |
32 | } | 32 | } |
33 | 33 | ||
34 | foreach (self::$pages as $page) { | 34 | foreach (self::$pages as $page) { |
35 | file_put_contents(self::$testCacheDir.'/'.$page.'.cache', $page); | 35 | file_put_contents(self::$testCacheDir.'/'.$page.'.cache', $page); |
36 | } | 36 | } |
@@ -38,6 +38,15 @@ class CacheTest extends PHPUnit_Framework_TestCase | |||
38 | } | 38 | } |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * Remove dummycache folder after each tests. | ||
42 | */ | ||
43 | public function tearDown() | ||
44 | { | ||
45 | array_map('unlink', glob(self::$testCacheDir.'/*')); | ||
46 | rmdir(self::$testCacheDir); | ||
47 | } | ||
48 | |||
49 | /** | ||
41 | * Purge cached pages | 50 | * Purge cached pages |
42 | */ | 51 | */ |
43 | public function testPurgeCachedPages() | 52 | public function testPurgeCachedPages() |