Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tests/Core/Ruleset/ProcessRulesetBrokenRulesetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
*
* @group Windows
*
* @covers \PHP_CodeSniffer\Ruleset::processRuleset
*/
final class ProcessRulesetBrokenRulesetTest extends AbstractRulesetTestCase
Expand Down Expand Up @@ -60,7 +62,7 @@ public function testBrokenRulesetSingleError()
$config = new ConfigDouble(["--standard=$standard"]);

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

$this->expectRuntimeExceptionRegex($regex);

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

$regex = '`^ERROR: 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 10, column 11: Opening and ending tag mismatch: properties line [57] and ruleset\R';
$regex .= '(- On line 11, column 1: (Premature end of data in tag rule(set)? line [24]|EndTag: \'</\' not found)\R)*$`';

$this->expectRuntimeExceptionRegex($regex);

Expand Down