1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-18 04:12:00 +02:00

Cache clear test.

This commit is contained in:
Cameron
2020-12-28 10:56:21 -08:00
parent 7d04bc5c6a
commit 8048744de7
2 changed files with 26 additions and 2 deletions

View File

@@ -107,12 +107,25 @@ class ecacheTest extends \Codeception\Test\Unit
{
}
*/
public function testClear()
{
$cacheName = 'testClearCache';
$this->cache->set($cacheName, "something", true);
$file = $this->cache->getLastFile();
// check it has been created.
$exists = file_exists($file);
$this->assertTrue($exists);
// check it has been deleted.
$this->cache->clear($cacheName);
$exists = file_exists($file);
$this->assertFalse($exists);
}
/*
public function testDelete()
{