Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function testMemory(): void |
||
19 | { |
||
20 | $cache = new ArrayAdapter(); |
||
21 | $fileBoundCache = new FileBoundCache($cache, 'prefix'); |
||
22 | $adapter = new FileBoundMemoryAdapter($fileBoundCache); |
||
23 | |||
24 | $tmpPath = sys_get_temp_dir().'/tmpCacheTest'; |
||
25 | touch($tmpPath); |
||
26 | |||
27 | $adapter->set('foo', 'bar', [ |
||
28 | $tmpPath |
||
29 | ]); |
||
30 | |||
31 | $this->assertSame('bar', $adapter->get('foo')); |
||
32 | |||
33 | $adapter2 = new FileBoundMemoryAdapter($fileBoundCache); |
||
34 | $this->assertSame('bar', $adapter2->get('foo')); |
||
35 | |||
36 | sleep(1); |
||
37 | clearstatcache($tmpPath); |
||
38 | touch($tmpPath); |
||
39 | |||
40 | $this->assertSame('bar', $adapter->get('foo')); |
||
41 | } |
||
43 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths