File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1313
1414namespace CodeIgniter \Commands ;
1515
16+ use CodeIgniter \CodeIgniter ;
1617use CodeIgniter \Test \CIUnitTestCase ;
1718use CodeIgniter \Test \StreamFilterTrait ;
1819use PHPUnit \Framework \Attributes \Group ;
@@ -63,4 +64,22 @@ public function testHelpCommandOnInexistentCommandButWithAlternatives(): void
6364 $ this ->assertStringContainsString ('Command "clear" not found. ' , $ this ->getBuffer ());
6465 $ this ->assertStringContainsString ('Did you mean one of these? ' , $ this ->getBuffer ());
6566 }
67+
68+ public function testNormalHelpCommandHasNoBanner (): void
69+ {
70+ command ('help ' );
71+ $ this ->assertStringNotContainsString (
72+ sprintf ('CodeIgniter %s Command Line Tool ' , CodeIgniter::CI_VERSION ),
73+ $ this ->getBuffer (),
74+ );
75+ }
76+
77+ public function testHelpCommandWithDoubleHyphenStillRemovesBanner (): void
78+ {
79+ command ('help -- list ' );
80+ $ this ->assertStringNotContainsString (
81+ sprintf ('CodeIgniter %s Command Line Tool ' , CodeIgniter::CI_VERSION ),
82+ $ this ->getBuffer (),
83+ );
84+ }
6685}
You can’t perform that action at this time.
0 commit comments