annotate vendor/phar-io/manifest/tests/xml/ExtElementCollectionTest.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 1fec387a4317
children
rev   line source
Chris@14 1 <?php
Chris@14 2
Chris@14 3 namespace PharIo\Manifest;
Chris@14 4
Chris@14 5 use DOMDocument;
Chris@14 6
Chris@14 7 class ExtElementCollectionTest extends \PHPUnit_Framework_TestCase {
Chris@14 8 public function testComponentElementCanBeRetrievedFromCollection() {
Chris@14 9 $dom = new DOMDocument();
Chris@14 10 $dom->loadXML('<?xml version="1.0" ?><ext xmlns="https://phar.io/xml/manifest/1.0" />');
Chris@14 11 $collection = new ExtElementCollection($dom->childNodes);
Chris@14 12
Chris@14 13 foreach($collection as $position => $extElement) {
Chris@14 14 $this->assertInstanceOf(ExtElement::class, $extElement);
Chris@14 15 $this->assertEquals(0, $position);
Chris@14 16 }
Chris@14 17 }
Chris@14 18
Chris@14 19 }