Nenhuma descrição

ExtElementCollectionTest.php 587B

1234567891011121314151617181920
  1. <?php
  2. namespace PharIo\Manifest;
  3. use DOMDocument;
  4. class ExtElementCollectionTest extends \PHPUnit\Framework\TestCase {
  5. public function testComponentElementCanBeRetrievedFromCollection() {
  6. $dom = new DOMDocument();
  7. $dom->loadXML('<?xml version="1.0" ?><ext xmlns="https://phar.io/xml/manifest/1.0" />');
  8. $collection = new ExtElementCollection($dom->childNodes);
  9. foreach($collection as $position => $extElement) {
  10. $this->assertInstanceOf(ExtElement::class, $extElement);
  11. $this->assertEquals(0, $position);
  12. }
  13. }
  14. }