Total Complexity | 4 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class CacheTest extends TestCase |
||
15 | { |
||
16 | private $app; |
||
17 | |||
18 | public function setUp(): void |
||
23 | } |
||
24 | |||
25 | public function testCache(): void |
||
26 | { |
||
27 | $cache = __DIR__ . '/App/runtime/cache/routes.php'; |
||
28 | $this->assertFileExists($cache); |
||
29 | |||
30 | $this->assertIsIterable($this->include($cache)); |
||
31 | $this->assertCount(2, $this->include($cache)); |
||
32 | |||
33 | |||
34 | $cli = $this->app->getConsole(); |
||
35 | $cli->run('route:reset'); |
||
36 | |||
37 | $this->assertNull($this->include($cache)); |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param string $file |
||
42 | * @return mixed |
||
43 | */ |
||
44 | private function include(string $file) |
||
52 | } |
||
53 | } |
||
54 |