File tree 4 files changed +8
-17
lines changed 4 files changed +8
-17
lines changed Original file line number Diff line number Diff line change 8
8
steps :
9
9
- checkout
10
10
11
- - run :
12
- name : Install PHPUnit
13
- command : |
14
- composer require phpunit/phpunit:7.5.17 --no-update
15
-
16
11
- run :
17
12
name : Run tests / Symfony 4^3
18
13
command : |
33
28
steps :
34
29
- checkout
35
30
36
- - run :
37
- name : Install PHPUnit
38
- command : |
39
- composer require phpunit/phpunit:7.5.17 --no-update
40
-
41
31
- run :
42
32
name : Run tests / Symfony 5^0
43
33
command : |
Original file line number Diff line number Diff line change 21
21
"react/stream" : " ^1.0"
22
22
},
23
23
"require-dev" : {
24
- "clue/block-react" : " ^1.3"
24
+ "clue/block-react" : " ^1.3" ,
25
+ "phpunit/phpunit" : " 7.5.17"
25
26
},
26
27
"autoload" : {
27
28
"files" : [ " src/functions_include.php" ]
Original file line number Diff line number Diff line change 5
5
6
6
use PHPUnit \Framework \TestCase ;
7
7
use React \EventLoop \Factory ;
8
- use React \Promise \FulfilledPromise ;
9
8
use Drift \React ;
10
9
use Clue \React \Block ;
10
+ use function React \Promise \resolve ;
11
11
12
12
/**
13
13
* Class SleepTest
@@ -19,7 +19,7 @@ function testIt()
19
19
$ loop = Factory::create ();
20
20
$ elements = [];
21
21
22
- $ promiseXZ = ( new FulfilledPromise () )
22
+ $ promiseXZ = resolve ( )
23
23
->then (function () use (&$ elements ){
24
24
$ elements [] = 'X ' ;
25
25
})
@@ -30,7 +30,7 @@ function testIt()
30
30
$ elements [] = 'Z ' ;
31
31
});
32
32
33
- $ promiseY = ( new FulfilledPromise () )
33
+ $ promiseY = resolve ( )
34
34
->then (function () use ($ loop ) {
35
35
return React \sleep (1 , $ loop );
36
36
})
Original file line number Diff line number Diff line change 5
5
6
6
use PHPUnit \Framework \TestCase ;
7
7
use React \EventLoop \Factory ;
8
- use React \Promise \FulfilledPromise ;
9
8
use Drift \React ;
10
9
use Clue \React \Block ;
10
+ use function React \Promise \resolve ;
11
11
12
12
/**
13
13
* Class UsleepTest
@@ -19,7 +19,7 @@ function testIt()
19
19
$ loop = Factory::create ();
20
20
$ elements = [];
21
21
22
- $ promiseXZ = ( new FulfilledPromise () )
22
+ $ promiseXZ = resolve ( )
23
23
->then (function () use (&$ elements ){
24
24
$ elements [] = 'X ' ;
25
25
})
@@ -30,7 +30,7 @@ function testIt()
30
30
$ elements [] = 'Z ' ;
31
31
});
32
32
33
- $ promiseY = ( new FulfilledPromise () )
33
+ $ promiseY = resolve ( )
34
34
->then (function () use ($ loop ) {
35
35
return React \usleep (100 , $ loop );
36
36
})
You can’t perform that action at this time.
0 commit comments