File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -59,13 +59,18 @@ public function testExpandSniffDirectory()
5959 */
6060
6161 $ expectedSniffCodes = [
62+ '.Sniffs.IncorrectLevelShouldStillBeFound ' => 'MyStandard \\Sniffs \\IncorrectLevelShouldStillBeFoundSniff ' ,
6263 'MyStandard.CategoryA.FindMe ' => 'MyStandard \\Sniffs \\CategoryA \\FindMeSniff ' ,
63- 'Sniffs.SubDir.IncorrectLevelShouldStillBeFound ' => 'MyStandard \\Sniffs \\CategoryA \\SubDir \\IncorrectLevelShouldStillBeFoundSniff ' ,
6464 'MyStandard.CategoryB.FindMe ' => 'MyStandard \\Sniffs \\CategoryB \\FindMeSniff ' ,
65- '. Sniffs.IncorrectLevelShouldStillBeFound ' => 'MyStandard \\Sniffs \\IncorrectLevelShouldStillBeFoundSniff ' ,
65+ 'Sniffs.SubDir. IncorrectLevelShouldStillBeFound ' => 'MyStandard \\Sniffs \\ CategoryA \\ SubDir \\IncorrectLevelShouldStillBeFoundSniff ' ,
6666 ];
6767
68- $ this ->assertSame ($ expectedSniffCodes , $ ruleset ->sniffCodes , 'Registered sniffs do not match expectation ' );
68+ // Sort the value to make the tests stable as different OSes will read directories
69+ // in a different order and the order is not relevant for these tests. Just the values.
70+ $ actual = $ ruleset ->sniffCodes ;
71+ ksort ($ actual );
72+
73+ $ this ->assertSame ($ expectedSniffCodes , $ actual , 'Registered sniffs do not match expectation ' );
6974
7075 }//end testExpandSniffDirectory()
7176
You can’t perform that action at this time.
0 commit comments