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:
1515 - php : hhvm
1616
1717before_script :
18- - composer install --dev --prefer-source
18+ - composer install
1919
2020script :
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).
5959* gzip content encoding
6060* keep-alive connections
6161* 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 1313 "react/promise" : " ~2.2" ,
1414 "evenement/evenement" : " ~2.0"
1515 },
16+ "require-dev" : {
17+ "phpunit/phpunit" : " ^5.0 || ^4.8.10"
18+ },
1619 "autoload" : {
1720 "psr-4" : {
1821 "React\\ HttpClient\\ " : " src"
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ public function setUp()
2121 ->disableOriginalConstructor ()
2222 ->getMock ();
2323
24- $ this ->connector = $ this ->getMock ('React\SocketClient\ConnectorInterface ' );
24+ $ this ->connector = $ this ->getMockBuilder ('React\SocketClient\ConnectorInterface ' )
25+ ->getMock ();
2526
2627 $ this ->response = $ this ->getMockBuilder ('React\HttpClient\Response ' )
2728 ->disableOriginalConstructor ()
@@ -386,7 +387,9 @@ public function pipeShouldPipeDataIntoTheRequestBody()
386387 ->method ('__invoke ' )
387388 ->will ($ this ->returnValue ($ this ->response ));
388389
389- $ loop = $ this ->getMock ('React\EventLoop\LoopInterface ' );
390+ $ loop = $ this
391+ ->getMockBuilder ('React\EventLoop\LoopInterface ' )
392+ ->getMock ();
390393
391394 $ request ->setResponseFactory ($ factory );
392395
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class ResponseTest extends TestCase
1111
1212 public function setUp ()
1313 {
14- $ this ->stream = $ this ->getMockbuilder ('React\Stream\Stream ' )
14+ $ this ->stream = $ this ->getMockBuilder ('React\Stream\Stream ' )
1515 ->disableOriginalConstructor ()
1616 ->getMock ();
1717 }
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ protected function expectCallableNever()
3636
3737 protected function createCallableMock ()
3838 {
39- return $ this ->getMock ('React\Tests\HttpClient\CallableStub ' );
39+ return $ this
40+ ->getMockBuilder ('React\Tests\HttpClient\CallableStub ' )
41+ ->getMock ();
4042 }
4143}
You can’t perform that action at this time.
0 commit comments