| Total Complexity | 3 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | #[Group('utils')] |
||
| 19 | final class ElementRegistryTest extends TestCase |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * Test that the class-name can be resolved and it's localname matches. |
||
| 23 | */ |
||
| 24 | public function testElementRegistry(): void |
||
| 25 | { |
||
| 26 | $elementRegistry = dirname(__FILE__, 3) . '/src/XML/element.registry.php'; |
||
| 27 | $namespaces = include($elementRegistry); |
||
| 28 | |||
| 29 | foreach ($namespaces as $namespaceURI => $elements) { |
||
| 30 | foreach ($elements as $localName => $fqdn) { |
||
| 31 | $this->assertTrue(class_exists($fqdn), sprintf('Class \'%s\' could not be found.', $fqdn)); |
||
| 32 | $this->assertEquals($fqdn::getLocalName(), $localName); |
||
| 33 | $this->assertEquals($fqdn::getNamespaceURI(), $namespaceURI); |
||
| 34 | } |
||
| 38 |