minor #26282 [Console] fix console test (Simperfit)

This PR was merged into the 4.1-dev branch.

Discussion
----------

[Console] fix console test

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | none

It seems that tests are broken due to missing spaces.

Commits
-------

965e472 [Console] fix console test
This commit is contained in:
Robin Chalas 2018-02-23 14:31:05 +01:00
commit 7be0ccccce

View File

@ -485,18 +485,10 @@ class ApplicationTest extends TestCase
$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()
@ -508,17 +500,9 @@ OUTPUT
$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()