| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function testRegisteredTypeCanBeRetrieved() |
||
| 12 | { |
||
| 13 | $class = DummyType::class; |
||
| 14 | $this->assertFalse(TypeRegistry::hasType($class)); |
||
| 15 | TypeRegistry::addType($class); |
||
| 16 | $this->assertTrue(TypeRegistry::hasType($class)); |
||
| 17 | $this->assertInstanceOf(\stdClass::class, TypeRegistry::getType($class)); |
||
| 18 | } |
||
| 19 | } |
||
| 33 |
Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.