Skip to content

Commit

Permalink
Ignore libxml2 error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann authored and theseer committed Mar 24, 2022
1 parent 2fecb91 commit 61c7b9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/TempladoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testCanBeConstructedFromString(): void {
*/
public function testTryingToParseInvalidMarkupStringThrowsException(): void {
$this->expectException(TempladoException::class);
$this->expectExceptionMessage('Premature end of data in tag root line 1 (Line 1, Column 29)');
$this->expectExceptionMessageMatches('/^Parsing string failed:\R.*Line.*Column.*$/m');

Templado::parseHtmlString('<?xml version="1.0" ?><root>');
}
Expand All @@ -34,7 +34,7 @@ public function testTryingToParseInvalidMarkupStringThrowsException(): void {
*/
public function testTryingToLoadBrokenFileThrowsException(): void {
$this->expectException(TempladoException::class);
$this->expectExceptionMessage('Premature end of data in tag start line 2 (Line 4, Column 1)');
$this->expectExceptionMessageMatches('/^Loading file.*failed:\R.*Line.*Column.*$/m');

Templado::loadHtmlFile(new FileName(__DIR__ . '/_data/broken.txt'));
}
Expand Down

0 comments on commit 61c7b9c

Please sign in to comment.