Mercurial > hg > isophonics-drupal-site
annotate vendor/phar-io/manifest/tests/xml/ComponentElementCollectionTest.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 ComponentElementCollectionTest 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" ?><component xmlns="https://phar.io/xml/manifest/1.0" />'); |
Chris@14 | 11 $collection = new ComponentElementCollection($dom->childNodes); |
Chris@14 | 12 |
Chris@14 | 13 foreach($collection as $componentElement) { |
Chris@14 | 14 $this->assertInstanceOf(ComponentElement::class, $componentElement); |
Chris@14 | 15 } |
Chris@14 | 16 } |
Chris@14 | 17 |
Chris@14 | 18 } |