diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php index 2c36acb651..1444ffe1a4 100644 --- a/src/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php @@ -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(<< -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 - , $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()