public function InputDefinitionTest::testGetArgumentDefaults in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/Input/InputDefinitionTest.php \Symfony\Component\Console\Tests\Input\InputDefinitionTest::testGetArgumentDefaults()
File
- vendor/
symfony/ console/ Tests/ Input/ InputDefinitionTest.php, line 179
Class
Namespace
Symfony\Component\Console\Tests\InputCode
public function testGetArgumentDefaults() {
$definition = new InputDefinition(array(
new InputArgument('foo1', InputArgument::OPTIONAL),
new InputArgument('foo2', InputArgument::OPTIONAL, '', 'default'),
new InputArgument('foo3', InputArgument::OPTIONAL | InputArgument::IS_ARRAY),
));
$this
->assertEquals(array(
'foo1' => null,
'foo2' => 'default',
'foo3' => array(),
), $definition
->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument');
$definition = new InputDefinition(array(
new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', array(
1,
2,
)),
));
$this
->assertEquals(array(
'foo4' => array(
1,
2,
),
), $definition
->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument');
}