| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 1 | public function assertOctaneCacheHas(string $key, mixed $value = null): static |
|
| 19 | { |
||
| 20 | 1 | $cache = $this->app->cache->store('octane'); |
|
| 21 | |||
| 22 | 1 | if ($value === null) { |
|
| 23 | 1 | $this->assertTrue($cache->has($key), "The Octane cache doesn't have the [$key] key set"); |
|
|
|
|||
| 24 | } else { |
||
| 25 | 1 | $actual = $cache->get($key); |
|
| 26 | 1 | $this->assertSame($value, $actual, "Expected cached value [$value], got [$actual] instead"); |
|
| 27 | } |
||
| 28 | |||
| 29 | 1 | return $this; |
|
| 30 | } |
||
| 47 |