annotate vendor/phar-io/manifest/tests/xml/AuthorElementCollectionTest.php @ 2:5311817fb629

Theme updates
author Chris Cannam
date Tue, 10 Jul 2018 13:19:18 +0000
parents
children
rev   line source
Chris@2 1 <?php
Chris@2 2
Chris@2 3 namespace PharIo\Manifest;
Chris@2 4
Chris@2 5 use DOMDocument;
Chris@2 6
Chris@2 7 class AuthorElementCollectionTest extends \PHPUnit_Framework_TestCase {
Chris@2 8 public function testAuthorElementCanBeRetrievedFromCollection() {
Chris@2 9 $dom = new DOMDocument();
Chris@2 10 $dom->loadXML('<?xml version="1.0" ?><author xmlns="https://phar.io/xml/manifest/1.0" name="Reiner Zufall" email="reiner@zufall.de" />');
Chris@2 11 $collection = new AuthorElementCollection($dom->childNodes);
Chris@2 12
Chris@2 13 foreach($collection as $authorElement) {
Chris@2 14 $this->assertInstanceOf(AuthorElement::class, $authorElement);
Chris@2 15 }
Chris@2 16 }
Chris@2 17
Chris@2 18 }