| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function testGetType() |
||
| 26 | { |
||
| 27 | $type = new ObjectType([ |
||
| 28 | 'name' => 'Foo', |
||
| 29 | 'fields' => function() {return [];} |
||
| 30 | ]); |
||
| 31 | |||
| 32 | $registry = new TypeRegistry(); |
||
| 33 | $registry->registerType($type); |
||
| 34 | |||
| 35 | $this->assertSame($type, $registry->getType('Foo')); |
||
| 36 | |||
| 37 | $this->expectException(GraphQLException::class); |
||
| 38 | $registry->getType('Bar'); |
||
| 39 | } |
||
| 56 |