10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 484ac81 commit af9c97cCopy full SHA for af9c97c
src/Symfony/Component/Console/Tests/Input/InputArgumentTest.php
@@ -88,6 +88,14 @@ public function testSetDefaultWithRequiredArgument()
88
$argument->setDefault('default');
89
}
90
91
+ public function testSetDefaultWithRequiredArrayArgument()
92
+ {
93
+ $this->expectException(\LogicException::class);
94
+ $this->expectExceptionMessage('Cannot set a default value except for InputArgument::OPTIONAL mode.');
95
+ $argument = new InputArgument('foo', InputArgument::REQUIRED | InputArgument::IS_ARRAY);
96
+ $argument->setDefault([]);
97
+ }
98
+
99
public function testSetDefaultWithArrayArgument()
100
{
101
$this->expectException(\LogicException::class);
0 commit comments