ComponentElementCollectionTest.php 563 B

12345678910111213141516171819
  1. <?php
  2. namespace PharIo\Manifest;
  3. use DOMDocument;
  4. class ComponentElementCollectionTest extends \PHPUnit\Framework\TestCase {
  5. public function testComponentElementCanBeRetrievedFromCollection() {
  6. $dom = new DOMDocument();
  7. $dom->loadXML('<?xml version="1.0" ?><component xmlns="https://phar.io/xml/manifest/1.0" />');
  8. $collection = new ComponentElementCollection($dom->childNodes);
  9. foreach($collection as $componentElement) {
  10. $this->assertInstanceOf(ComponentElement::class, $componentElement);
  11. }
  12. }
  13. }