Skip to content

Commit aabfd5e

Browse files
authored
Merge pull request #935 from PHPCSStandards/feature/processbrokenrulesettest-tweak
ProcessRulesetBrokenRulesetTest: more tweaks for different libxml output
2 parents 9981876 + 9999671 commit aabfd5e

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
@@ -23,6 +23,8 @@
2323
* @runTestsInSeparateProcesses
2424
* @preserveGlobalState disabled
2525
*
26+
* @group Windows
27+
*
2628
* @covers \PHP_CodeSniffer\Ruleset::processRuleset
2729
*/
2830
final class ProcessRulesetBrokenRulesetTest extends AbstractRulesetTestCase
@@ -60,7 +62,7 @@ public function testBrokenRulesetSingleError()
6062
$config = new ConfigDouble(["--standard=$standard"]);
6163

6264
$regex = '`^ERROR: Ruleset \S+ProcessRulesetBrokenRulesetSingleErrorTest\.xml is not valid\R';
63-
$regex .= '- On line 3, column 1: Premature end of data in tag ruleset line 2\R$`';
65+
$regex .= '- On line 3, column 1: (Premature end of data in tag ruleset line 2|EndTag: \'</\' not found)\R$`';
6466

6567
$this->expectRuntimeExceptionRegex($regex);
6668

@@ -81,8 +83,8 @@ public function testBrokenRulesetMultiError()
8183

8284
$regex = '`^ERROR: Ruleset \S+ProcessRulesetBrokenRulesetMultiErrorTest\.xml is not valid\R';
8385
$regex .= '- On line 8, column 12: Opening and ending tag mismatch: property line 7 and rule\R';
84-
$regex .= '- On line 10, column 11: Opening and ending tag mismatch: properties line 5 and ruleset\R';
85-
$regex .= '(- On line 11, column 1: Premature end of data in tag rule line 4\R)?$`';
86+
$regex .= '- On line 10, column 11: Opening and ending tag mismatch: properties line [57] and ruleset\R';
87+
$regex .= '(- On line 11, column 1: (Premature end of data in tag rule(set)? line [24]|EndTag: \'</\' not found)\R)*$`';
8688

8789
$this->expectRuntimeExceptionRegex($regex);
8890

0 commit comments

Comments
 (0)