nginxsonarrradarrplexorganizrdashboardbookmarkapplication-dashboardmuximuxlandingpagestartpagelandinghtpcserverhomepagesabnzbdheimdallembycouchpotatonzbget
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
575 B
19 lines
575 B
<?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());
|
|
}
|
|
|
|
}
|
|
|