diff --git a/tests/Core/Ruleset/ProcessRulesetBrokenRulesetTest.php b/tests/Core/Ruleset/ProcessRulesetBrokenRulesetTest.php index 95f67c21df..9e16f83892 100644 --- a/tests/Core/Ruleset/ProcessRulesetBrokenRulesetTest.php +++ b/tests/Core/Ruleset/ProcessRulesetBrokenRulesetTest.php @@ -39,7 +39,9 @@ public function testBrokenRulesetEmptyFile() $standard = __DIR__.'/ProcessRulesetBrokenRulesetEmptyFileTest.xml'; $config = new ConfigDouble(["--standard=$standard"]); - $regex = '`^Ruleset \S+ProcessRulesetBrokenRulesetEmptyFileTest\.xml is not valid\R$`'; + $regex = '`^Ruleset \S+ProcessRulesetBrokenRulesetEmptyFileTest\.xml is not valid\R'; + $regex .= '(- On line 1, column 1: Document is empty\R)?$`'; + $this->expectRuntimeExceptionRegex($regex); new Ruleset($config); @@ -80,7 +82,7 @@ public function testBrokenRulesetMultiError() $regex = '`^Ruleset \S+ProcessRulesetBrokenRulesetMultiErrorTest\.xml is not valid\R'; $regex .= '- On line 8, column 12: Opening and ending tag mismatch: property line 7 and rule\R'; $regex .= '- On line 10, column 11: Opening and ending tag mismatch: properties line 5 and ruleset\R'; - $regex .= '- On line 11, column 1: Premature end of data in tag rule line 4\R$`'; + $regex .= '(- On line 11, column 1: Premature end of data in tag rule line 4\R)?$`'; $this->expectRuntimeExceptionRegex($regex);