Total Complexity | 2 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class StaticTest extends \CommonTestClass |
||
12 | { |
||
13 | /** |
||
14 | * @throws CacheException |
||
15 | */ |
||
16 | public function testRun(): void |
||
17 | { |
||
18 | StaticCache::setCache(new Simple\Memory()); |
||
19 | $this->assertNotEmpty(StaticCache::getCache()); |
||
20 | StaticCache::init(''); |
||
21 | |||
22 | $this->assertFalse(StaticCache::exists()); |
||
23 | $this->assertEquals('', StaticCache::get()); |
||
24 | // simple write |
||
25 | $this->assertTrue(StaticCache::set(static::TESTING_CONTENT)); |
||
26 | $this->assertTrue(StaticCache::exists()); |
||
27 | $this->assertEquals(static::TESTING_CONTENT, StaticCache::get()); |
||
28 | // clear all |
||
29 | StaticCache::clear(); |
||
30 | $this->assertFalse(StaticCache::exists()); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @throws CacheException |
||
35 | */ |
||
36 | public function testFailExists(): void |
||
42 | } |
||
43 | } |
||
44 |