diff --git a/tests/TempladoTest.php b/tests/TempladoTest.php index 6a632c0..fa11fcb 100644 --- a/tests/TempladoTest.php +++ b/tests/TempladoTest.php @@ -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(''); } @@ -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')); }