| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function testGetExtra() { |
||
| 20 | $extra = (object) [ |
||
| 21 | 'defined' => 'obviously', |
||
| 22 | ]; |
||
| 23 | $componentSpecification = new ComponentSpecification( |
||
| 24 | 'type_name', '2015021800', null, null, $extra); |
||
| 25 | $this->assertEquals( |
||
| 26 | 'obviously', $componentSpecification->getExtra('defined')); |
||
| 27 | |||
| 28 | $this->expectException(OutOfBoundsException::class); |
||
| 29 | $componentSpecification->getExtra('definitelyUndefined'); |
||
| 30 | } |
||
| 31 | } |
||
| 32 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.