Remove dummycache folder on tear down.

This commit is contained in:
ArthurHoaro 2015-12-03 19:27:34 +01:00
parent 9ecdeb5452
commit b6a54537b8
1 changed files with 10 additions and 1 deletions

View File

@ -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
*/