@@ -20,7 +20,7 @@ public function setUp()
2020
2121 public function testJsonPassingRejectedPromiseResolvesWithClosedStream ()
2222 {
23- $ stream = $ this ->parser ->parseJsonStream (Promise \reject ());
23+ $ stream = $ this ->parser ->parseJsonStream (Promise \reject (new \ RuntimeException () ));
2424
2525 $ this ->assertInstanceOf ('React\Stream\ReadableStreamInterface ' , $ stream );
2626 $ this ->assertFalse ($ stream ->isReadable ());
@@ -62,7 +62,7 @@ public function testJsonResolvingPromiseWithWrongValueWillEmitErrorAndCloseEvent
6262
6363 public function testPlainPassingRejectedPromiseResolvesWithClosedStream ()
6464 {
65- $ stream = $ this ->parser ->parsePlainStream (Promise \reject ());
65+ $ stream = $ this ->parser ->parsePlainStream (Promise \reject (new \ RuntimeException () ));
6666
6767 $ this ->assertInstanceOf ('React\Stream\ReadableStreamInterface ' , $ stream );
6868 $ this ->assertFalse ($ stream ->isReadable ());
@@ -102,12 +102,12 @@ public function testDeferredStreamErrorEventWillRejectPromise()
102102
103103 $ stream ->emit ('data ' , array ('a ' ));
104104
105- $ stream ->emit ('error ' , array (' value ' , ' ignord ' ));
105+ $ stream ->emit ('error ' , array (new \ RuntimeException () ));
106106
107107 $ stream ->close ();
108108
109109 $ this ->expectPromiseReject ($ promise );
110- $ promise ->then (null , $ this ->expectCallableOnceWith (' value ' ));
110+ $ promise ->then (null , $ this ->expectCallableOnceWith ($ this -> isInstanceOf ( ' RuntimeException ' ) ));
111111 }
112112
113113 public function testDeferredCancelingPromiseWillCloseStream ()
0 commit comments