Mercurial > hg > cmmr2012-drupal-site
annotate vendor/phar-io/manifest/tests/xml/AuthorElementCollectionTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | 5311817fb629 |
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 } |