Show correct class name InputArgument in error message
This commit is contained in:
parent
e1c031f166
commit
9aec4c8d04
@ -96,7 +96,7 @@ class InputArgument
|
||||
public function setDefault($default = null)
|
||||
{
|
||||
if (self::REQUIRED === $this->mode && null !== $default) {
|
||||
throw new \LogicException('Cannot set a default value except for Parameter::OPTIONAL mode.');
|
||||
throw new \LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.');
|
||||
}
|
||||
|
||||
if ($this->isArray()) {
|
||||
|
@ -82,7 +82,7 @@ class InputArgumentTest extends \PHPUnit_Framework_TestCase
|
||||
$this->fail('->setDefault() throws an Exception if you give a default value for a required argument');
|
||||
} catch (\Exception $e) {
|
||||
$this->assertInstanceOf('\Exception', $e, '->parse() throws an \InvalidArgumentException exception if an invalid option is passed');
|
||||
$this->assertEquals('Cannot set a default value except for Parameter::OPTIONAL mode.', $e->getMessage());
|
||||
$this->assertEquals('Cannot set a default value except for InputArgument::OPTIONAL mode.', $e->getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
|
Reference in New Issue
Block a user