diff options
author | ArthurHoaro <arthur@hoa.ro> | 2015-12-03 19:27:34 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2015-12-03 19:27:34 +0100 |
commit | b6a54537b8823d2b96e9bdb64e280959d6681c36 (patch) | |
tree | 0b255b92673846dba4eaee3508c8f5133eb0f2e2 /tests/CacheTest.php | |
parent | 9ecdeb54528eaebf12edc6af7a4082420a9899ee (diff) | |
download | Shaarli-b6a54537b8823d2b96e9bdb64e280959d6681c36.tar.gz Shaarli-b6a54537b8823d2b96e9bdb64e280959d6681c36.tar.zst Shaarli-b6a54537b8823d2b96e9bdb64e280959d6681c36.zip |
Remove dummycache folder on tear down.
Diffstat (limited to 'tests/CacheTest.php')
-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() |