From b6a54537b8823d2b96e9bdb64e280959d6681c36 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 3 Dec 2015 19:27:34 +0100 Subject: [PATCH] Remove dummycache folder on tear down. --- tests/CacheTest.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/CacheTest.php b/tests/CacheTest.php index eacd448..26c4322 100644 --- a/tests/CacheTest.php +++ b/tests/CacheTest.php @@ -30,13 +30,22 @@ class CacheTest extends PHPUnit_Framework_TestCase } else { array_map('unlink', glob(self::$testCacheDir.'/*')); } - + foreach (self::$pages as $page) { file_put_contents(self::$testCacheDir.'/'.$page.'.cache', $page); } file_put_contents(self::$testCacheDir.'/intru.der', 'ShouldNotBeThere'); } + /** + * Remove dummycache folder after each tests. + */ + public function tearDown() + { + array_map('unlink', glob(self::$testCacheDir.'/*')); + rmdir(self::$testCacheDir); + } + /** * Purge cached pages */