@@ -485,18 +485,10 @@ public function testCanRunAlternativeCommandName()
485
485
$ tester = new ApplicationTester ($ application );
486
486
$ tester ->setInputs (array ('y ' ));
487
487
$ 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 );
500
492
}
501
493
502
494
public function testDontRunAlternativeCommandName ()
@@ -508,17 +500,9 @@ public function testDontRunAlternativeCommandName()
508
500
$ tester ->setInputs (array ('n ' ));
509
501
$ exitCode = $ tester ->run (array ('command ' => 'foos ' ), array ('decorated ' => false ));
510
502
$ 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 );
522
506
}
523
507
524
508
public function provideInvalidCommandNamesSingle ()
0 commit comments