public function testInvalidModes() { $this->
expectException(\InvalidArgumentException::
class);
$this->
expectExceptionMessage('Argument mode "-1" is not valid.'
);
new InputArgument('foo', '-1'
);
} public function testIsArray() { $argument =
new InputArgument('foo', InputArgument::IS_ARRAY
);
$this->
assertTrue($argument->
isArray(), '->isArray() returns true if the argument can be an array'
);
$argument =
new InputArgument('foo', InputArgument::OPTIONAL | InputArgument::IS_ARRAY
);
$this->
assertTrue($argument->
isArray(), '->isArray() returns true if the argument can be an array'
);
$argument =
new InputArgument('foo', InputArgument::OPTIONAL
);
$this->
assertFalse($argument->
isArray(), '->isArray() returns false if the argument cannot be an array'
);
} public function testGetDescription() { $argument =
new InputArgument('foo', null, 'Some description'
);
$this->
assertEquals('Some description',
$argument->
getDescription(), '->getDescription() return the message description'
);
}