Added Laravel project
This commit is contained in:
19
Laravel/vendor/phar-io/manifest/tests/exceptions/ManifestDocumentLoadingExceptionTest.php
vendored
Normal file
19
Laravel/vendor/phar-io/manifest/tests/exceptions/ManifestDocumentLoadingExceptionTest.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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());
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user