Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public function testSilentLogger(): void |
||
22 | { |
||
23 | $logger = new SilentLogger(); |
||
24 | $this->assertInstanceOf(LoggerInterface::class, $logger); |
||
25 | |||
26 | // Inspect SilentLogger to be actually silent. |
||
27 | // Check for exactly 3 lines of code. |
||
28 | $class = new ReflectionClass($logger); |
||
29 | $method = $class->getMethod('log'); |
||
30 | $this->assertEquals(3, $method->getEndLine() - $method->getStartLine()); |
||
31 | |||
32 | // Check if the lines of code are silent. |
||
33 | $source = file($class->getFileName()); |
||
34 | $this->assertRegExp('~^\s*{\s*$~', $source[$method->getStartLine()]); |
||
35 | $this->assertRegExp('~^\s*//~', $source[$method->getStartLine() + 1]); |
||
36 | $this->assertRegExp('~^\s*}\s*$~', $source[$method->getStartLine() + 2]); |
||
37 | } |
||
39 |
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