Skip to content

Commit dcf9875

Browse files
authored
Merge pull request #11 from clue-labs/tests
Add PHPUnit to require-dev
2 parents 62b42f3 + c47c27a commit dcf9875

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
language: php
2+
23
php:
34
- 5.3
45
- 5.4
56
- 5.5
67
- 5.6
78
- 7
89
- hhvm
10+
911
install:
10-
- composer install --prefer-source --no-interaction
12+
- composer install --no-interaction
13+
1114
script:
12-
- phpunit --coverage-text --verbose || ([[ $? = 139 ]] && echo && echo "Ignoring SEGFAULT.." >&2)
15+
- vendor/bin/phpunit --coverage-text --verbose || ([[ $? = 139 ]] && echo && echo "Ignoring SEGFAULT.." >&2)

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ supporting compression and decompression of the following formats:
2222
* [createDecompressor()](#createdecompressor)
2323
* [Inconsistencies](#inconsistencies)
2424
* [Install](#install)
25+
* [Tests](#tests)
2526
* [License](#license)
2627
* [More](#more)
2728

@@ -154,6 +155,21 @@ The recommended way to install this library is [through composer](https://getcom
154155
$ composer require clue/zlib-react:~0.1.0
155156
```
156157

158+
## Tests
159+
160+
To run the test suite, you first need to clone this repo and then install all
161+
dependencies [through Composer](https://getcomposer.org):
162+
163+
```bash
164+
$ composer install
165+
```
166+
167+
To run the test suite, go to the project root and run:
168+
169+
```bash
170+
$ php vendor/bin/phpunit
171+
```
172+
157173
## License
158174

159175
MIT

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"clue/stream-filter": "~1.3"
1717
},
1818
"require-dev": {
19-
"react/event-loop": "~0.4.0|~0.3.0"
19+
"react/event-loop": "~0.4.0|~0.3.0",
20+
"phpunit/phpunit": "^5.0 || ^4.8"
2021
},
2122
"suggest": {
2223
"ext-zlib": "Requires ext-zlib extension"

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function expectCallableNever()
4242
*/
4343
protected function createCallableMock()
4444
{
45-
return $this->getMock('CallableStub');
45+
return $this->getMockBuilder('CallableStub')->getMock();
4646
}
4747
}
4848

0 commit comments

Comments
 (0)