Skip to content

Commit 2a899fc

Browse files
committed
GetIgnorePatternsTest: prevent a failure for a difference in array order
1 parent 5306b47 commit 2a899fc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/Core/Ruleset/GetIgnorePatternsTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ public static function initializeConfigAndRuleset()
5858
*/
5959
public function testGetIgnorePatterns($listener, $expected)
6060
{
61-
$this->assertSame($expected, self::$ruleset->getIgnorePatterns($listener));
61+
$actual = self::$ruleset->getIgnorePatterns($listener);
62+
63+
// Prevent differences in the order of the array from failing the test.
64+
ksort($expected);
65+
ksort($actual);
66+
67+
$this->assertSame($expected, $actual);
6268

6369
}//end testGetIgnorePatterns()
6470

0 commit comments

Comments
 (0)