From a52c354504de019fd65eef66d806c617ea9fd103 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 18 Nov 2024 04:45:21 +0100 Subject: [PATCH] ShowSniffDeprecationsTest: fix bug in tests Wasn't noticeable, still a bug. --- tests/Core/Ruleset/ShowSniffDeprecationsTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Core/Ruleset/ShowSniffDeprecationsTest.php b/tests/Core/Ruleset/ShowSniffDeprecationsTest.php index 8e81f96a25..43f850f051 100644 --- a/tests/Core/Ruleset/ShowSniffDeprecationsTest.php +++ b/tests/Core/Ruleset/ShowSniffDeprecationsTest.php @@ -146,7 +146,7 @@ public function testDeprecatedSniffsListDoesNotShowWhenSelectedSniffsAreNotDepre ]; foreach ($sniffs as $sniffCode) { $parts = explode('.', strtolower($sniffCode)); - $sniffName = $parts[0].'\sniffs\\'.$parts[1].'\\'.$parts[2].'sniff'; + $sniffName = $parts[0].'\\sniffs\\'.$parts[1].'\\'.$parts[2].'sniff'; $restrictions[strtolower($sniffName)] = true; } @@ -158,7 +158,7 @@ public function testDeprecatedSniffsListDoesNotShowWhenSelectedSniffsAreNotDepre $sniffFiles[] = $sniffFile; } - $ruleset->registerSniffs($allSniffs, $restrictions, []); + $ruleset->registerSniffs($sniffFiles, $restrictions, []); $ruleset->populateTokenListeners(); $this->expectOutputString(''); @@ -195,7 +195,7 @@ public function testDeprecatedSniffsListDoesNotShowWhenAllDeprecatedSniffsAreExc ]; foreach ($exclude as $sniffCode) { $parts = explode('.', strtolower($sniffCode)); - $sniffName = $parts[0].'\sniffs\\'.$parts[1].'\\'.$parts[2].'sniff'; + $sniffName = $parts[0].'\\sniffs\\'.$parts[1].'\\'.$parts[2].'sniff'; $exclusions[strtolower($sniffName)] = true; } @@ -207,7 +207,7 @@ public function testDeprecatedSniffsListDoesNotShowWhenAllDeprecatedSniffsAreExc $sniffFiles[] = $sniffFile; } - $ruleset->registerSniffs($allSniffs, [], $exclusions); + $ruleset->registerSniffs($sniffFiles, [], $exclusions); $ruleset->populateTokenListeners(); $this->expectOutputString('');