8000 [Console] fix console test by Simperfit · Pull Request #26282 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Console] fix console test #26282

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

Merged
merged 1 commit into from
Feb 23, 2018
Merged
Changes from all commits
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
[Console] fix console test
  • Loading branch information
Amrouche Hamza committed Feb 23, 2018
commit 965e472acb9c7bee0677f92c82e119b65b71c982
30 changes: 7 additions & 23 deletions src/Symfony/Component/Console/Tests/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,18 +485,10 @@ public function testCanRunAlternativeCommandName()
$tester = new ApplicationTester($application);
$tester->setInputs(array('y'));
$tester->run(array('command' => 'foos'), array('decorated' => false));
$this->assertSame(<<<OUTPUT


Command "foos" is not defined.


Do you want to run "foo" instead? (yes/no) [no]:
>
called

OUTPUT
, $tester->getDisplay(true));
$display = trim($tester->getDisplay(true));
$this->assertContains('Command "foos" is not defined', $display);
$this->assertContains('Do you want to run "foo" instead? (yes/no) [no]:', $display);
$this->assertContains('called', $display);
}

public function testDontRunAlternativeCommandName()
Expand All @@ -508,17 +500,9 @@ public function testDontRunAlternativeCommandName()
$tester->setInputs(array('n'));
$exitCode = $tester->run(array('command' => 'foos'), array('decorated' => false));
$this->assertSame(1, $exitCode);
$this->assertSame(<<<OUTPUT


Command "foos" is not defined.


Do you want to run "foo" instead? (yes/no) [no]:
>

OUTPUT
, $tester->getDisplay(true));
$display = trim($tester->getDisplay(true));
$this->assertContains('Command "foos" is not defined', $display);
$this->assertContains('Do you want to run "foo" instead? (yes/no) [no]:', $display);
}

public function provideInvalidCommandNamesSingle()
Expand Down
0