@@ -123,7 +123,7 @@ public static function dataGetProperty(): array
123123 */
124124 public function testProcessCliCommandUnsupportedArgument (string $ unsupportedArgument )
125125 {
126- $ _SERVER ['argv ' ] = \explode (' ' , "./phpcs-check-sniff- doc-code -examples $ unsupportedArgument " );
126+ $ _SERVER ['argv ' ] = \explode (' ' , "./phpcs-check-doc-examples $ unsupportedArgument " );
127127
128128 $ this ->expectException ('RuntimeException ' );
129129 $ this ->expectExceptionMessage ("Unsupported argument $ unsupportedArgument " );
@@ -161,7 +161,7 @@ public function testProcessInvalidTargetThrowException()
161161 $ this ->expectException ('RuntimeException ' );
162162 $ this ->expectExceptionMessage ('Target path ./doesnotexist does not exist ' );
163163
164- $ _SERVER ['argv ' ] = ['phpcs-check-sniff- doc-code -examples ' , './doesnotexist ' ];
164+ $ _SERVER ['argv ' ] = ['phpcs-check-doc-examples ' , './doesnotexist ' ];
165165 new Config ($ this ->writer );
166166 }
167167
@@ -202,7 +202,7 @@ public static function dataProcessCliCommand(): array
202202
203203 $ testData = [
204204 'No arguments at all - verify target dir will be set to project root ' => [
205- 'command ' => './phpcs-check-sniff- doc-code -examples ' ,
205+ 'command ' => './phpcs-check-doc-examples ' ,
206206 'expectedChanged ' => [
207207 'projectRoot ' => $ projectRoot ,
208208 'targetPaths ' => [
@@ -211,7 +211,7 @@ public static function dataProcessCliCommand(): array
211211 ],
212212 ],
213213 'No arguments at all and trailing whitespace in the command ' => [
214- 'command ' => './phpcs-check-sniff- doc-code -examples ' ,
214+ 'command ' => './phpcs-check-doc-examples ' ,
215215 'expectedChanged ' => [
216216 'projectRoot ' => $ projectRoot ,
217217 'targetPaths ' => [
@@ -220,7 +220,7 @@ public static function dataProcessCliCommand(): array
220220 ],
221221 ],
222222 'No arguments other than a path ' => [
223- 'command ' => './phpcs-check-sniff- doc-code -examples . ' ,
223+ 'command ' => './phpcs-check-doc-examples . ' ,
224224 'expectedChanged ' => [
225225 'projectRoot ' => $ projectRoot ,
226226 'targetPaths ' => [
@@ -229,7 +229,7 @@ public static function dataProcessCliCommand(): array
229229 ],
230230 ],
231231 'No arguments other than multiple valid paths in varying formats ' => [
232- 'command ' => './phpcs-check-sniff- doc-code -examples ./PHPCSDebug ./Tests bin ' . __DIR__ . '/../../.github/ ' ,
232+ 'command ' => './phpcs-check-doc-examples ./PHPCSDebug ./Tests bin ' . __DIR__ . '/../../.github/ ' ,
233233 'expectedChanged ' => [
234234 'projectRoot ' => $ projectRoot ,
235235 'targetPaths ' => [
@@ -241,7 +241,7 @@ public static function dataProcessCliCommand(): array
241241 ],
242242 ],
243243 'Multiple excludes, varying formats ' => [
244- 'command ' => './phpcs-check-sniff- doc-code -examples . '
244+ 'command ' => './phpcs-check-doc-examples . '
245245 . ' --exclude=.git,./.github/,Tests/FeatureComplete,/node_modules/,tests/notvalid,../../levelup ' ,
246246 'expectedChanged ' => [
247247 'projectRoot ' => $ projectRoot ,
@@ -259,7 +259,7 @@ public static function dataProcessCliCommand(): array
259259 ],
260260 ],
261261 'Exclude, complete value wrapped in quotes ' => [
262- 'command ' => './phpcs-check-sniff- doc-code -examples --exclude=".git,./.github/,Tests/FeatureComplete" ' ,
262+ 'command ' => './phpcs-check-doc-examples --exclude=".git,./.github/,Tests/FeatureComplete" ' ,
263263 'expectedChanged ' => [
264264 'projectRoot ' => $ projectRoot ,
265265 'targetPaths ' => [
@@ -273,7 +273,7 @@ public static function dataProcessCliCommand(): array
273273 ],
274274 ],
275275 'Exclude, no value ' => [
276- 'command ' => './phpcs-check-sniff- doc-code -examples --exclude= ' ,
276+ 'command ' => './phpcs-check-doc-examples --exclude= ' ,
277277 'expectedChanged ' => [
278278 'projectRoot ' => $ projectRoot ,
279279 'targetPaths ' => [
@@ -283,7 +283,7 @@ public static function dataProcessCliCommand(): array
283283 ],
284284 ],
285285 'Single sniff to ignore ' => [
286- 'command ' => './phpcs-check-sniff- doc-code -examples --ignore-sniffs=Generic.CodeAnalysis.EmptyStatement ' ,
286+ 'command ' => './phpcs-check-doc-examples --ignore-sniffs=Generic.CodeAnalysis.EmptyStatement ' ,
287287 'expectedChanged ' => [
288288 'projectRoot ' => $ projectRoot ,
289289 'targetPaths ' => [
@@ -295,7 +295,7 @@ public static function dataProcessCliCommand(): array
295295 ],
296296 ],
297297 'Multiple sniffs to ignore wrapped in quotes ' => [
298- 'command ' => "./phpcs-check-sniff- doc-code -examples --ignore-sniffs='Generic.CodeAnalysis.EmptyStatement,Squiz.ControlStructures.ForEachLoopDeclaration,Squiz.Arrays.ArrayDeclaration' " ,
298+ 'command ' => "./phpcs-check-doc-examples --ignore-sniffs='Generic.CodeAnalysis.EmptyStatement,Squiz.ControlStructures.ForEachLoopDeclaration,Squiz.Arrays.ArrayDeclaration' " ,
299299 'expectedChanged ' => [
300300 'projectRoot ' => $ projectRoot ,
301301 'targetPaths ' => [
@@ -309,7 +309,7 @@ public static function dataProcessCliCommand(): array
309309 ],
310310 ],
311311 'All together now, includes testing for handling of additional whitespace between arguments ' => [
312- 'command ' => 'phpcs-check-sniff- doc-code -examples Scripts --exclude=ignoreme,/other,./tests/ '
312+ 'command ' => 'phpcs-check-doc-examples Scripts --exclude=ignoreme,/other,./tests/ '
313313 . ' --ignore-sniffs=Generic.CodeAnalysis.EmptyStatement PHPCSDebug ./Tests . ' ,
314314 'expectedChanged ' => [
315315 'projectRoot ' => $ projectRoot ,
@@ -330,7 +330,7 @@ public static function dataProcessCliCommand(): array
330330 ],
331331 ],
332332 'Help argument ' => [
333- 'command ' => './phpcs-check-sniff- doc-code -examples --help ' ,
333+ 'command ' => './phpcs-check-doc-examples --help ' ,
334334 'expectedChanged ' => [
335335 'projectRoot ' => $ projectRoot ,
336336 'executeCheck ' => false ,
@@ -341,7 +341,7 @@ public static function dataProcessCliCommand(): array
341341 // Windows only test: verify that the paths are normalized to use forward slashes.
342342 if (\DIRECTORY_SEPARATOR === '\\' ) {
343343 $ testData ['Target paths and excluded dirs paths normalized to use forward slashes ' ] = [
344- 'command ' => 'phpcs-check-sniff- doc-code -examples Scripts\DocCodeExamples Tests\Fixtures\DocCodeExamples '
344+ 'command ' => 'phpcs-check-doc-examples Scripts\DocCodeExamples Tests\Fixtures\DocCodeExamples '
345345 . ' --exclude=Scripts\Utils,Tests\Fixtures\DocsXsd ' ,
346346 'expectedChanged ' => [
347347 'projectRoot ' => $ projectRoot ,
@@ -367,14 +367,14 @@ public static function dataProcessCliCommand(): array
367367 */
368368 public function testHelpOutput ()
369369 {
370- $ _SERVER ['argv ' ] = ['phpcs-check-sniff- doc-code -examples ' , '--help ' ];
370+ $ _SERVER ['argv ' ] = ['phpcs-check-doc-examples ' , '--help ' ];
371371 new Config ($ this ->writer );
372372
373373 $ output = $ this ->writer ->getStdout ();
374374
375375 // Just check that a key element in the help text is displayed.
376376 $ this ->assertStringContainsString ('Usage: ' , $ output );
377- $ this ->assertStringContainsString ('phpcs-check-sniff- doc-code -examples ' , $ output );
377+ $ this ->assertStringContainsString ('phpcs-check-doc-examples ' , $ output );
378378 }
379379
380380 /**
0 commit comments