shows correct class name InputOption in error message
This commit is contained in:
parent
a09319df75
commit
762649f5c3
@ -148,7 +148,7 @@ class InputOption
|
||||
public function setDefault($default = null)
|
||||
{
|
||||
if (self::VALUE_NONE === (self::VALUE_NONE & $this->mode) && null !== $default) {
|
||||
throw new \LogicException('Cannot set a default value when using Option::VALUE_NONE mode.');
|
||||
throw new \LogicException('Cannot set a default value when using InputOption::VALUE_NONE mode.');
|
||||
}
|
||||
|
||||
if ($this->isArray()) {
|
||||
|
@ -121,7 +121,7 @@ class InputOptionTest extends \PHPUnit_Framework_TestCase
|
||||
$this->fail('->setDefault() throws an Exception if you give a default value for a VALUE_NONE option');
|
||||
} catch (\Exception $e) {
|
||||
$this->assertInstanceOf('\Exception', $e, '->setDefault() throws an Exception if you give a default value for a VALUE_NONE option');
|
||||
$this->assertEquals('Cannot set a default value when using Option::VALUE_NONE mode.', $e->getMessage());
|
||||
$this->assertEquals('Cannot set a default value when using InputOption::VALUE_NONE mode.', $e->getMessage());
|
||||
}
|
||||
|
||||
$option = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY);
|
||||
|
Reference in New Issue
Block a user