File tree Expand file tree Collapse file tree 6 files changed +29
-6
lines changed Expand file tree Collapse file tree 6 files changed +29
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ matrix:
15
15
- php : hhvm
16
16
17
17
before_script :
18
- - composer install --dev --prefer-source
18
+ - composer install
19
19
20
20
script :
21
- - phpunit --coverage-text
21
+ - vendor/bin/ phpunit --coverage-text
Original file line number Diff line number Diff line change @@ -59,3 +59,18 @@ See also the [examples](examples).
59
59
* gzip content encoding
60
60
* keep-alive connections
61
61
* following redirections
62
+
63
+ ## Tests
64
+
65
+ To run the test suite, you first need to clone this repo and then install all
66
+ dependencies [ through Composer] ( https://getcomposer.org ) :
67
+
68
+ ``` bash
69
+ $ composer install
70
+ ```
71
+
72
+ To run the test suite, go to the project root and run:
73
+
74
+ ``` bash
75
+ $ php vendor/bin/phpunit
76
+ ```
Original file line number Diff line number Diff line change 13
13
"react/promise" : " ~2.2" ,
14
14
"evenement/evenement" : " ~2.0"
15
15
},
16
+ "require-dev" : {
17
+ "phpunit/phpunit" : " ^5.0 || ^4.8.10"
18
+ },
16
19
"autoload" : {
17
20
"psr-4" : {
18
21
"React\\ HttpClient\\ " : " src"
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ public function setUp()
21
21
->disableOriginalConstructor ()
22
22
->getMock ();
23
23
24
- $ this ->connector = $ this ->getMock ('React\SocketClient\ConnectorInterface ' );
24
+ $ this ->connector = $ this ->getMockBuilder ('React\SocketClient\ConnectorInterface ' )
25
+ ->getMock ();
25
26
26
27
$ this ->response = $ this ->getMockBuilder ('React\HttpClient\Response ' )
27
28
->disableOriginalConstructor ()
@@ -386,7 +387,9 @@ public function pipeShouldPipeDataIntoTheRequestBody()
386
387
->method ('__invoke ' )
387
388
->will ($ this ->returnValue ($ this ->response ));
388
389
389
- $ loop = $ this ->getMock ('React\EventLoop\LoopInterface ' );
390
+ $ loop = $ this
391
+ ->getMockBuilder ('React\EventLoop\LoopInterface ' )
392
+ ->getMock ();
390
393
391
394
$ request ->setResponseFactory ($ factory );
392
395
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class ResponseTest extends TestCase
11
11
12
12
public function setUp ()
13
13
{
14
- $ this ->stream = $ this ->getMockbuilder ('React\Stream\Stream ' )
14
+ $ this ->stream = $ this ->getMockBuilder ('React\Stream\Stream ' )
15
15
->disableOriginalConstructor ()
16
16
->getMock ();
17
17
}
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ protected function expectCallableNever()
36
36
37
37
protected function createCallableMock ()
38
38
{
39
- return $ this ->getMock ('React\Tests\HttpClient\CallableStub ' );
39
+ return $ this
40
+ ->getMockBuilder ('React\Tests\HttpClient\CallableStub ' )
41
+ ->getMock ();
40
42
}
41
43
}
You can’t perform that action at this time.
0 commit comments