Total Complexity | 5 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
20 | class DecoratorTest extends PHPUnit_Framework_TestCase |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * @var Component |
||
25 | */ |
||
26 | protected $component; |
||
27 | |||
28 | protected function setUp(): void |
||
29 | { |
||
30 | $this->component = new Component('key', 'value'); |
||
31 | } |
||
32 | |||
33 | public function testComponent() |
||
34 | { |
||
35 | $this->assertCount(1, $this->getComponent()->getData()); |
||
36 | } |
||
37 | |||
38 | public function testXmlDecorator() |
||
39 | { |
||
40 | $xmlDecorator = new XmlDecorator($this->getComponent()); |
||
41 | $this->assertEquals("<?xml version=\"1.0\"?>\n<root><key>value</key></root>\n", $xmlDecorator->getData()); |
||
42 | } |
||
43 | |||
44 | public function testJsonDecorator() |
||
45 | { |
||
46 | $jsonDecorator = new JsonDecorator($this->getComponent()); |
||
47 | $this->assertEquals('{"key":"value"}', $jsonDecorator->getData()); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @return mixed |
||
52 | */ |
||
53 | public function getComponent() |
||
56 | } |
||
57 | } |
||
58 |
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