$this->
assertEquals(2,
$definition->
getArgumentCount(), '->getArgumentCount() returns the number of arguments'
);
} public function testGetArgumentDefaults() { $definition =
new InputDefinition([ new InputArgument('foo1', InputArgument::OPTIONAL
),
new InputArgument('foo2', InputArgument::OPTIONAL, '', 'default'
),
new InputArgument('foo3', InputArgument::OPTIONAL | InputArgument::IS_ARRAY
),
// new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', [1, 2]),
]);
$this->
assertEquals(['foo1' => null, 'foo2' => 'default', 'foo3' =>
[]],
$definition->
getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'
);
$definition =
new InputDefinition([ new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '',
[1, 2
]),
]);
$this->
assertEquals(['foo4' =>
[1, 2
]],
$definition->
getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'
);
} public function testSetOptions() { $this->
initializeOptions();