Remove dummycache folder on tear down.

This commit is contained in:
ArthurHoaro 2015-12-03 19:27:34 +01:00
parent 9ecdeb5452
commit b6a54537b8

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