diff --git a/.travis.yml b/.travis.yml index 6983d72..ff544ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,24 @@ language: php php: - - 5.3 +# - 5.3 # requires old distro - 5.4 - 5.5 - 5.6 - - 7 - - hhvm + - 7.0 + - 7.1 + - 7.2 + - hhvm # ignore errors, see below + +# lock distro so new future defaults will not break the build +dist: trusty + +matrix: + include: + - php: 5.3 + dist: precise + allow_failures: + - php: hhvm sudo: false diff --git a/README.md b/README.md index 28a773c..087e7b3 100644 --- a/README.md +++ b/README.md @@ -200,7 +200,8 @@ See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. ## Tests -To run the test suite, you first need to clone this repo and then install all dependencies [through Composer](http://getcomposer.org): +To run the test suite, you first need to clone this repo and then install all +dependencies [through Composer](http://getcomposer.org): ```bash $ composer install diff --git a/composer.json b/composer.json index c38c393..c7028c1 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ }, "require-dev": { "react/event-loop": " ^0.4 || ^0.3", - "phpunit/phpunit": "^5.0 || ^4.8", + "phpunit/phpunit": "^6.0 || ^5.7 || ^4.8.35", "react/stream": "^1.0 || ^0.7 || ^0.6" } } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 91ad7d3..4ff6600 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,10 +1,12 @@ expects($this->once()) ->method('__invoke') - ->with($this->equalTo($value)); - - return $mock; - } - - protected function expectCallableOnceParameter($type) - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->isInstanceOf($type)); + ->with($value); return $mock; } - /** - * @link https://github.com/reactphp/react/blob/master/tests/React/Tests/Socket/TestCase.php (taken from reactphp/react) - */ protected function createCallableMock() { - return $this->getMockBuilder('CallableStub')->getMock(); - } -} - -class CallableStub -{ - public function __invoke() - { + return $this->getMockBuilder('stdClass')->setMethods(array('__invoke'))->getMock(); } } -