1 | <?php |
||
17 | /** |
||
18 | * @coversDefaultClass \ComponentManager\ComponentSpecification |
||
19 | */ |
||
20 | class ComponentSpecificationTest extends TestCase { |
||
21 | public function testGetExtra() { |
||
22 | $extra = (object) [ |
||
23 | 'defined' => 'obviously', |
||
24 | ]; |
||
25 | $componentSpecification = new ComponentSpecification( |
||
26 | 'type_name', '2015021800', null, null, $extra); |
||
27 | $this->assertEquals( |
||
28 | 'obviously', $componentSpecification->getExtra('defined')); |
||
29 | |||
30 | $this->expectException(OutOfBoundsException::class); |
||
31 | $componentSpecification->getExtra('definitelyUndefined'); |
||
34 |