Mercurial > hg > isophonics-drupal-site
view vendor/phar-io/manifest/tests/exceptions/ManifestDocumentLoadingExceptionTest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
line wrap: on
line source
<?php namespace PharIo\Manifest; use DOMDocument; use LibXMLError; class ManifestDocumentLoadingExceptionTest extends \PHPUnit_Framework_TestCase { public function testXMLErrorsCanBeRetrieved() { $dom = new DOMDocument(); $prev = libxml_use_internal_errors(true); $dom->loadXML('<?xml version="1.0" ?><broken>'); $exception = new ManifestDocumentLoadingException(libxml_get_errors()); libxml_use_internal_errors($prev); $this->assertContainsOnlyInstancesOf(LibXMLError::class, $exception->getLibxmlErrors()); } }