File tree Expand file tree Collapse file tree 4 files changed +8
-17
lines changed Expand file tree Collapse file tree 4 files changed +8
-17
lines changed Original file line number Diff line number Diff line change 88 steps :
99 - checkout
1010
11- - run :
12- name : Install PHPUnit
13- command : |
14- composer require phpunit/phpunit:7.5.17 --no-update
15-
1611 - run :
1712 name : Run tests / Symfony 4^3
1813 command : |
3328 steps :
3429 - checkout
3530
36- - run :
37- name : Install PHPUnit
38- command : |
39- composer require phpunit/phpunit:7.5.17 --no-update
40-
4131 - run :
4232 name : Run tests / Symfony 5^0
4333 command : |
Original file line number Diff line number Diff line change 2121 "react/stream" : " ^1.0"
2222 },
2323 "require-dev" : {
24- "clue/block-react" : " ^1.3"
24+ "clue/block-react" : " ^1.3" ,
25+ "phpunit/phpunit" : " 7.5.17"
2526 },
2627 "autoload" : {
2728 "files" : [ " src/functions_include.php" ]
Original file line number Diff line number Diff line change 55
66use PHPUnit \Framework \TestCase ;
77use React \EventLoop \Factory ;
8- use React \Promise \FulfilledPromise ;
98use Drift \React ;
109use Clue \React \Block ;
10+ use function React \Promise \resolve ;
1111
1212/**
1313 * Class SleepTest
@@ -19,7 +19,7 @@ function testIt()
1919 $ loop = Factory::create ();
2020 $ elements = [];
2121
22- $ promiseXZ = ( new FulfilledPromise () )
22+ $ promiseXZ = resolve ( )
2323 ->then (function () use (&$ elements ){
2424 $ elements [] = 'X ' ;
2525 })
@@ -30,7 +30,7 @@ function testIt()
3030 $ elements [] = 'Z ' ;
3131 });
3232
33- $ promiseY = ( new FulfilledPromise () )
33+ $ promiseY = resolve ( )
3434 ->then (function () use ($ loop ) {
3535 return React \sleep (1 , $ loop );
3636 })
Original file line number Diff line number Diff line change 55
66use PHPUnit \Framework \TestCase ;
77use React \EventLoop \Factory ;
8- use React \Promise \FulfilledPromise ;
98use Drift \React ;
109use Clue \React \Block ;
10+ use function React \Promise \resolve ;
1111
1212/**
1313 * Class UsleepTest
@@ -19,7 +19,7 @@ function testIt()
1919 $ loop = Factory::create ();
2020 $ elements = [];
2121
22- $ promiseXZ = ( new FulfilledPromise () )
22+ $ promiseXZ = resolve ( )
2323 ->then (function () use (&$ elements ){
2424 $ elements [] = 'X ' ;
2525 })
@@ -30,7 +30,7 @@ function testIt()
3030 $ elements [] = 'Z ' ;
3131 });
3232
33- $ promiseY = ( new FulfilledPromise () )
33+ $ promiseY = resolve ( )
3434 ->then (function () use ($ loop ) {
3535 return React \usleep (100 , $ loop );
3636 })
You can’t perform that action at this time.
0 commit comments