@@ -799,7 +799,7 @@ public function testRunWithDispatcher()
799
799
800
800
$ tester = new ApplicationTester ($ application );
801
801
$ tester ->run (array ('command ' => 'foo ' ));
802
- $ this ->assertEquals ('before.foo.after. ' , $ tester ->getDisplay ());
802
+ $ this ->assertEquals ('before.foo.after. ' . PHP_EOL , $ tester ->getDisplay ());
803
803
}
804
804
805
805
/**
@@ -835,7 +835,7 @@ public function testRunDispatchesAllEventsWithException()
835
835
836
836
$ tester = new ApplicationTester ($ application );
837
837
$ tester ->run (array ('command ' => 'foo ' ));
838
- $ this ->assertContains ('before.foo.after. caught. ' , $ tester ->getDisplay ());
838
+ $ this ->assertContains ('before.foo.caught.after . ' , $ tester ->getDisplay ());
839
839
}
840
840
841
841
protected function getDispatcher ()
@@ -845,12 +845,12 @@ protected function getDispatcher()
845
845
$ event ->getOutput ()->write ('before. ' );
846
846
});
847
847
$ dispatcher ->addListener ('console.terminate ' , function (ConsoleTerminateEvent $ event ) {
848
- $ event ->getOutput ()->write ('after. ' );
848
+ $ event ->getOutput ()->writeln ('after. ' );
849
849
850
850
$ event ->setExitCode (128 );
851
851
});
852
852
$ dispatcher ->addListener ('console.exception ' , function (ConsoleExceptionEvent $ event ) {
853
- $ event ->getOutput ()->writeln ('caught. ' );
853
+ $ event ->getOutput ()->write ('caught. ' );
854
854
855
855
$ event ->setException (new \LogicException ('caught. ' , $ event ->getExitCode (), $ event ->getException ()));
856
856
});
0 commit comments