File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
src/Symfony/Component/Console/Tests/Input Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ public function testConstructor()
35
35
$ this ->assertEquals ('f ' , $ option ->getShortcut (), '__construct() can take a shortcut as its second argument ' );
36
36
$ option = new InputOption ('foo ' , '-f ' );
37
37
$ this ->assertEquals ('f ' , $ option ->getShortcut (), '__construct() removes the leading - of the shortcut ' );
38
+ $ option = new InputOption ('foo ' );
39
+ $ this ->assertNull ($ option ->getShortcut (), '__construct() makes the shortcut null by default ' );
40
+ $ option = new InputOption ('foo ' , '- ' );
41
+ $ this ->assertNull ($ option ->getShortcut (), '__construct() makes the shortcut null if a single dash is specified as its name ' );
38
42
39
43
// mode argument
40
44
$ option = new InputOption ('foo ' , 'f ' );
You can’t perform that action at this time.
0 commit comments