Mercurial > hg > isophonics-drupal-site
comparison vendor/phar-io/manifest/tests/exceptions/ManifestDocumentLoadingExceptionTest.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
1 <?php | |
2 | |
3 namespace PharIo\Manifest; | |
4 | |
5 use DOMDocument; | |
6 use LibXMLError; | |
7 | |
8 class ManifestDocumentLoadingExceptionTest extends \PHPUnit_Framework_TestCase { | |
9 public function testXMLErrorsCanBeRetrieved() { | |
10 $dom = new DOMDocument(); | |
11 $prev = libxml_use_internal_errors(true); | |
12 $dom->loadXML('<?xml version="1.0" ?><broken>'); | |
13 $exception = new ManifestDocumentLoadingException(libxml_get_errors()); | |
14 libxml_use_internal_errors($prev); | |
15 | |
16 $this->assertContainsOnlyInstancesOf(LibXMLError::class, $exception->getLibxmlErrors()); | |
17 } | |
18 | |
19 } |