File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11language : php
2+
23php :
34 - 5.3
5+ - 5.4
6+ - 5.5
47 - 5.6
5- - hhvm
8+ - 7.0
9+ - 7.1
10+
11+ # also test against HHVM, but require "trusty" and ignore errors
12+ matrix :
13+ include :
14+ - php : hhvm
15+ dist : trusty
16+ allow_failures :
17+ - php : hhvm
18+
619install :
7- - composer install --prefer-source --no-interaction
20+ - composer install --no-interaction
21+
822script :
9- - phpunit --coverage-text
23+ - vendor/bin/ phpunit --coverage-text
Original file line number Diff line number Diff line change @@ -20,6 +20,21 @@ The recommended way to install this library is [through composer](http://getcomp
2020}
2121```
2222
23+ ## Tests
24+
25+ To run the test suite, you first need to clone this repo and then install all
26+ dependencies [ through Composer] ( http://getcomposer.org ) :
27+
28+ ``` bash
29+ $ composer install
30+ ```
31+
32+ To run the test suite, go to the project root and run:
33+
34+ ``` bash
35+ $ php vendor/bin/phpunit
36+ ```
37+
2338## License
2439
2540MIT
Original file line number Diff line number Diff line change 1818 "react/event-loop" : " ~0.4.0|~0.3.0" ,
1919 "react/http" : " ~0.4.0|~0.3.0" ,
2020 "react/stream" : " ~0.4.0|~0.3.0"
21+ },
22+ "require-dev" : {
23+ "phpunit/phpunit" : " ^5.0 || ^4.8"
2124 }
2225}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ class BufferedChannelTest extends TestCase
66{
77 public function testNumberOfWritesToStream ()
88 {
9- $ stream = $ this ->getMock ('React\Stream\WritableStreamInterface ' );
9+ $ stream = $ this ->getMockBuilder ('React\Stream\WritableStreamInterface ' )-> getMock ( );
1010
1111 $ called = 0 ;
1212 $ stream ->expects ($ this ->any ())->method ('write ' )->will ($ this ->returnCallback (function () use (&$ called ) {
@@ -44,7 +44,7 @@ public function testNumberOfWritesToStream()
4444
4545 public function testResultingStreamBuffer ()
4646 {
47- $ stream = $ this ->getMock ('React\Stream\WritableStreamInterface ' );
47+ $ stream = $ this ->getMockBuilder ('React\Stream\WritableStreamInterface ' )-> getMock ( );
4848
4949 $ buffered = '' ;
5050 $ stream ->expects ($ this ->any ())->method ('write ' )->will ($ this ->returnCallback (function ($ data ) use (&$ buffered ) {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ protected function expectCallableOnce()
2020 */
2121 protected function createCallableMock ()
2222 {
23- return $ this ->getMock ('CallableStub ' );
23+ return $ this ->getMockBuilder ('CallableStub ' )-> getMock ( );
2424 }
2525}
2626
You can’t perform that action at this time.
0 commit comments