From 762649f5c337704021c240e82ceffe892ce10e19 Mon Sep 17 00:00:00 2001 From: Pablo Godel Date: Sat, 3 Nov 2012 23:51:02 -0400 Subject: [PATCH] shows correct class name InputOption in error message --- src/Symfony/Component/Console/Input/InputOption.php | 2 +- tests/Symfony/Tests/Component/Console/Input/InputOptionTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Console/Input/InputOption.php b/src/Symfony/Component/Console/Input/InputOption.php index cc609df75683..9d9d9788ad68 100644 --- a/src/Symfony/Component/Console/Input/InputOption.php +++ b/src/Symfony/Component/Console/Input/InputOption.php @@ -148,7 +148,7 @@ public function isArray() 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()) { diff --git a/tests/Symfony/Tests/Component/Console/Input/InputOptionTest.php b/tests/Symfony/Tests/Component/Console/Input/InputOptionTest.php index 1a37d58db968..7ca54ed01dab 100644 --- a/tests/Symfony/Tests/Component/Console/Input/InputOptionTest.php +++ b/tests/Symfony/Tests/Component/Console/Input/InputOptionTest.php @@ -121,7 +121,7 @@ public function testSetDefault() $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);