File tree Expand file tree Collapse file tree 4 files changed +10
-13
lines changed Expand file tree Collapse file tree 4 files changed +10
-13
lines changed Original file line number Diff line number Diff line change 88 - 7.0
99 - 7.1
1010 - 7.2
11+ - 7.3
1112 - hhvm # ignore errors, see below
1213
1314# lock distro so new future defaults will not break the build
Original file line number Diff line number Diff line change 1919 },
2020 "require" : {
2121 "php" : " >=5.3" ,
22- "react/stream" : " ^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4 || ^0.3 " ,
22+ "react/stream" : " ^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.6 " ,
2323 "react/promise" : " ^2.1 || ^1.2"
2424 },
2525 "require-dev" : {
2626 "react/event-loop" : " ^1.0 || ^0.5 || ^0.4 || ^0.3" ,
2727 "react/promise-timer" : " ^1.0" ,
2828 "clue/block-react" : " ^1.0" ,
29- "phpunit/phpunit" : " ^6.4 || ^5.7 || ^4.8.35"
29+ "phpunit/phpunit" : " ^7.0 || ^ 6.4 || ^5.7 || ^4.8.35"
3030 }
3131}
Original file line number Diff line number Diff line change 77 convertWarningsToExceptions =" true"
88>
99 <testsuites >
10- <testsuite >
10+ <testsuite name = " PromiseStream Test Suite " >
1111 <directory >./tests/</directory >
1212 </testsuite >
1313 </testsuites >
Original file line number Diff line number Diff line change @@ -318,24 +318,20 @@ public function testClosingStreamWillCloseInputStream()
318318
319319 public function testClosingStreamWillCloseStreamIfItIgnoredCancellationAndResolvesLater ()
320320 {
321- $ this ->markTestIncomplete ();
322-
323321 $ input = new ThroughStream ();
322+ $ input ->on ('close ' , $ this ->expectCallableOnce ());
324323
325- $ loop = $ this ->loop ;
326- $ promise = new Promise \Promise (function ($ resolve ) use ($ loop , $ input ) {
327- $ loop ->addTimer (0.001 , function () use ($ resolve , $ input ) {
328- $ resolve ($ input );
329- });
330- });
324+ $ deferred = new Deferred ();
331325
332- $ stream = Stream \unwrapReadable ($ promise );
326+ $ stream = Stream \unwrapReadable ($ deferred -> promise () );
333327
334328 $ stream ->on ('close ' , $ this ->expectCallableOnce ());
335329
336330 $ stream ->close ();
337331
338- Block \await ($ promise , $ this ->loop );
332+ $ this ->assertTrue ($ input ->isReadable ());
333+
334+ $ deferred ->resolve ($ input );
339335
340336 $ this ->assertFalse ($ input ->isReadable ());
341337 }
You can’t perform that action at this time.
0 commit comments