Skip to content

Commit

Permalink
F
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Nov 22, 2024
1 parent e0fa7b8 commit 50ab771
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/Core/Ruleset/ExpandSniffDirectoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,18 @@ public function testExpandSniffDirectory()
*/

$expectedSniffCodes = [
'.Sniffs.IncorrectLevelShouldStillBeFound' => 'MyStandard\\Sniffs\\IncorrectLevelShouldStillBeFoundSniff',
'MyStandard.CategoryA.FindMe' => 'MyStandard\\Sniffs\\CategoryA\\FindMeSniff',
'Sniffs.SubDir.IncorrectLevelShouldStillBeFound' => 'MyStandard\\Sniffs\\CategoryA\\SubDir\\IncorrectLevelShouldStillBeFoundSniff',
'MyStandard.CategoryB.FindMe' => 'MyStandard\\Sniffs\\CategoryB\\FindMeSniff',
'.Sniffs.IncorrectLevelShouldStillBeFound' => 'MyStandard\\Sniffs\\IncorrectLevelShouldStillBeFoundSniff',
'Sniffs.SubDir.IncorrectLevelShouldStillBeFound' => 'MyStandard\\Sniffs\\CategoryA\\SubDir\\IncorrectLevelShouldStillBeFoundSniff',
];

$this->assertSame($expectedSniffCodes, $ruleset->sniffCodes, 'Registered sniffs do not match expectation');
// Sort the value to make the tests stable as different OSes will read directories
// in a different order and the order is not relevant for these tests. Just the values.
$actual = $ruleset->sniffCodes;
ksort($actual);

$this->assertSame($expectedSniffCodes, $actual, 'Registered sniffs do not match expectation');

}//end testExpandSniffDirectory()

Expand Down

0 comments on commit 50ab771

Please sign in to comment.