8000 [Console] Added three state long option by ocke · Pull Request #11883 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Console] Added three state long option #11883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
coding standard patch.
  • Loading branch information
Olaf Kwant committed Sep 10, 2014
commit f4ca4e58a0be11d656abb4bff87ab629a0d02e2a
8 changes: 4 additions & 4 deletions src/Symfony/Component/Console/Tests/Input/InputOptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,20 @@ public function testGetDefault()
$this->assertFalse($option->getDefault(), '->getDefault() returns false if the option does not take a value');

$option = new InputOption('foo', null, InputOption::VALUE_TERNARY);
$this->assertEquals(false, $option->getDefault(), '->getDefault() returns false');
$this->assertFalse($option->getDefault(), '->getDefault() returns false');

$option = new InputOption('foo', null, InputOption::VALUE_TERNARY, '', 'default');
$this->assertEquals(false, $option->getDefault(), '->getDefault() returns false');
$this->assertFalse($option->getDefault(), '->getDefault() returns false');
}


public function testGetFlagValue()
{
$option = new InputOption('foo');
$this->assertEquals(false, $option->getFlagValue(), '->getDefault() returns false');
$this->assertFalse($option->getFlagValue(), '->getDefault() returns false');

$option = new InputOption('foo', null, InputOption::VALUE_TERNARY);
$this->assertEquals(null, $option->getFlagValue(), '->getDefault() returns null if the option does not have a value');
$this->assertNull($option->getFlagValue(), '->getDefault() returns null if the option does not have a value');

$option = new InputOption('foo', null, InputOption::VALUE_TERNARY, '', 'default');
$this->assertEquals('default', $option->getFlagValue(), '->getDefault() returns the default value');
Expand Down
0