8000 minor #26282 [Console] fix console test (Simperfit) · symfony/symfony@7be0ccc · GitHub
[go: up one dir, main page]

Skip to content

Commit 7be0ccc

Browse files
committed
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
2 parents c12c078 + 965e472 commit 7be0ccc

File tree

1 file changed

+7
-23
lines changed

1 file changed

+7
-23
lines changed

src/Symfony/Component/Console/Tests/ApplicationTest.php

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -485,18 +485,10 @@ public function testCanRunAlternativeCommandName()
485485
$tester = new ApplicationTester($application);
486486
$tester->setInputs(array('y'));
487487
$tester->run(array('command' => 'foos'), array('decorated' => false));
488-
$this->assertSame(<<<OUTPUT
489-
490-
491-
Command "foos" is not defined.
492-
493-
494-
Do you want to run "foo" instead? (yes/no) [no]:
495-
>
496-
called
497-
498-
OUTPUT
499-
, $tester->getDisplay(true));
488+
$display = trim($tester->getDisplay(true));
489+
$this->assertContains('Command "foos" is not defined', $display);
490+
$this->assertContains('Do you want to run "foo" instead? (yes/no) [no]:', $display);
491+
$this->assertContains('called', $display);
500492
}
501493

502494
public function testDontRunAlternativeCommandName()
@@ -508,17 +500,9 @@ public function testDontRunAlternativeCommandName()
508500
$tester->setInputs(array('n'));
509501
$exitCode = $tester->run(array('command' => 'foos'), array('decorated' => false));
510502
$this->assertSame(1, $exitCode);
511-
$this->assertSame(<<<OUTPUT
512-
513-
514-
Command "foos" is not defined.
515-
516-
517-
Do you want to run "foo" instead? (yes/no) [no]:
518-
>
519-
520-
OUTPUT
521-
, $tester->getDisplay(true));
503+
$display = trim($tester->getDisplay(true));
504+
$this->assertContains('Command "foos" is not defined', $display);
505+
$this->assertContains('Do you want to run "foo" instead? (yes/no) [no]:', $display);
522506
}
523507

524508
public function provideInvalidCommandNamesSingle()

0 commit comments

Comments
 (0)
0