Skip to content

Commit 0a098f8

Browse files
committed
Fix libxml >= 2.12 compatibility
1 parent 154bb91 commit 0a098f8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/Core/Ruleset/ProcessRulesetBrokenRulesetTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ public function testBrokenRulesetEmptyFile()
3939
$standard = __DIR__.'/ProcessRulesetBrokenRulesetEmptyFileTest.xml';
4040
$config = new ConfigDouble(["--standard=$standard"]);
4141

42-
$regex = '`^Ruleset \S+ProcessRulesetBrokenRulesetEmptyFileTest\.xml is not valid\R$`';
42+
$regex = '#^Ruleset \S+ProcessRulesetBrokenRulesetEmptyFileTest\.xml is not valid\R';
43+
$regex .= '(- On line 1, column 1: Document is empty\R)?$#';
44+
4345
$this->expectRuntimeExceptionRegex($regex);
4446

4547
new Ruleset($config);
@@ -77,10 +79,10 @@ public function testBrokenRulesetMultiError()
7779
$standard = __DIR__.'/ProcessRulesetBrokenRulesetMultiErrorTest.xml';
7880
$config = new ConfigDouble(["--standard=$standard"]);
7981

80-
$regex = '`^Ruleset \S+ProcessRulesetBrokenRulesetMultiErrorTest\.xml is not valid\R';
82+
$regex = '#^Ruleset \S+ProcessRulesetBrokenRulesetMultiErrorTest\.xml is not valid\R';
8183
$regex .= '- On line 8, column 12: Opening and ending tag mismatch: property line 7 and rule\R';
8284
$regex .= '- On line 10, column 11: Opening and ending tag mismatch: properties line 5 and ruleset\R';
83-
$regex .= '- On line 11, column 1: Premature end of data in tag rule line 4\R$`';
85+
$regex .= '(- On line 11, column 1: Premature end of data in tag rule line 4\R)?$#';
8486

8587
$this->expectRuntimeExceptionRegex($regex);
8688

0 commit comments

Comments
 (0)