Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
language: php

php:
- 5.3
# - 5.3 # requires old distro, see below
- 5.4
- 5.5
- 5.6
- 7
- hhvm
- 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

install:
- composer install --prefer-source --no-interaction
- composer install --no-interaction

script:
- phpunit --coverage-text
- vendor/bin/phpunit --coverage-text
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ $ composer require react/datagram:^1.1.1

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):

```bash
$ composer install
```

To run the test suite, go to the project root and run:

```bash
$ php vendor/bin/phpunit
```

## License

MIT
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"react/promise": "~2.1|~1.2"
},
"require-dev": {
"clue/block-react": "~1.0"
"clue/block-react": "~1.0",
"phpunit/phpunit": "^5.0 || ^4.8"
}
}
2 changes: 1 addition & 1 deletion tests/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function testCancelCreateClientWithCancellableHostnameResolver()

public function testCancelCreateClientWithUncancellableHostnameResolver()
{
$promise = $this->getMock('React\Promise\PromiseInterface');
$promise = $this->getMockBuilder('React\Promise\PromiseInterface')->getMock();
$this->resolver->expects($this->once())->method('resolve')->with('example.com')->willReturn($promise);

$promise = $this->factory->createClient('example.com:0');
Expand Down
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected function expectCallableNever()

protected function createCallableMock()
{
return $this->getMock('CallableStub');
return $this->getMockBuilder('CallableStub')->getMock();
}

protected function createResolverMock()
Expand Down