This repository was archived by the owner on Jan 29, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +2
-32
lines changed
Expand file tree Collapse file tree 2 files changed +2
-32
lines changed Original file line number Diff line number Diff line change @@ -73,10 +73,10 @@ public function __construct(
7373 /**
7474 * Run the application
7575 */
76- public function run (ServerRequestInterface $ request = null ) : void
76+ public function run () : void
7777 {
7878 try {
79- $ request = $ request ?: ($ this ->serverRequestFactory )();
79+ $ request = ($ this ->serverRequestFactory )();
8080 } catch (Throwable $ e ) {
8181 // Error in generating the request
8282 $ this ->emitMarshalServerRequestException ($ e );
Original file line number Diff line number Diff line change @@ -80,34 +80,4 @@ public function testRunPassesRequestGeneratedByRequestFactoryToHandleWhenNoReque
8080
8181 $ this ->assertNull ($ runner ->run ());
8282 }
83-
84- public function testRunPassesRequestPassedDuringInvocationToHandler ()
85- {
86- $ request = $ this ->prophesize (ServerRequestInterface::class)->reveal ();
87-
88- $ serverRequestFactory = function () {
89- Assert::fail ('Should never hit server request factory ' );
90- };
91-
92- $ errorResponseGenerator = function ($ e ) {
93- Assert::fail ('Should never hit error response generator ' );
94- };
95-
96- $ response = $ this ->prophesize (ResponseInterface::class)->reveal ();
97-
98- $ handler = $ this ->prophesize (RequestHandlerInterface::class);
99- $ handler ->handle ($ request )->willReturn ($ response );
100-
101- $ emitter = $ this ->prophesize (EmitterInterface::class);
102- $ emitter ->emit ($ response )->shouldBeCalled ();
103-
104- $ runner = new RequestHandlerRunner (
105- $ handler ->reveal (),
106- $ emitter ->reveal (),
107- $ serverRequestFactory ,
108- $ errorResponseGenerator
109- );
110-
111- $ this ->assertNull ($ runner ->run ($ request ));
112- }
11383}
You can’t perform that action at this time.
0 commit comments