Show correct class name InputArgument in error message

This commit is contained in:
Pablo Godel 2012-11-05 14:52:03 -05:00
parent e1c031f166
commit 9aec4c8d04
2 changed files with 2 additions and 2 deletions

View File

@ -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()) {

View File

@ -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 {