annotate vendor/phar-io/manifest/tests/xml/AuthorElementCollectionTest.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 AuthorElementCollectionTest extends \PHPUnit_Framework_TestCase {
Chris@14 8 public function testAuthorElementCanBeRetrievedFromCollection() {
Chris@14 9 $dom = new DOMDocument();
Chris@14 10 $dom->loadXML('<?xml version="1.0" ?><author xmlns="https://phar.io/xml/manifest/1.0" name="Reiner Zufall" email="reiner@zufall.de" />');
Chris@14 11 $collection = new AuthorElementCollection($dom->childNodes);
Chris@14 12
Chris@14 13 foreach($collection as $authorElement) {
Chris@14 14 $this->assertInstanceOf(AuthorElement::class, $authorElement);
Chris@14 15 }
Chris@14 16 }
Chris@14 17
Chris@14 18 }