Skip to content

Commit 7141e6d

Browse files
committed
Fix generator name used in testDeprecatedSniffsListDoesNotShowNeedsCsMode()
This test is about ensuring that deprecated sniffs messages are not displayed when viewing sniff documentation, and it was added in 2507c78 (see PHPCSStandards#281). Before, passing any value to the `generator` parameter was enough and so, probably due to a typo, `text` was passed which does not correspond to a valid generator. The code being tested only checks if `Config::generator` is not `null`: https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/2507c78d6aa8fe714b19d5e62519cd75f0a3aceb/src/Ruleset.php#L343 Now that `Config` throws an exception when an invalid generator is passed. The test had to be adjusted to use a valid generator name.
1 parent 3b6c8c6 commit 7141e6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Core/Ruleset/ShowSniffDeprecationsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public static function dataDeprecatedSniffsListDoesNotShowNeedsCsMode()
153153
return [
154154
'Standard using deprecated sniffs; documentation is requested' => [
155155
'standard' => __DIR__.'/ShowSniffDeprecationsTest.xml',
156-
'additionalArgs' => ['--generator=text'],
156+
'additionalArgs' => ['--generator=Text'],
157157
],
158158
];
159159

0 commit comments

Comments
 (0)