Skip to content

Commit 85375c0

Browse files
authored
Merge pull request #7 from clue-labs/tests
Add PHPUnit to require-dev
2 parents a743001 + c790a63 commit 85375c0

File tree

5 files changed

+20
-3
lines changed

5 files changed

+20
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ install:
1414
- composer install --no-interaction
1515

1616
script:
17-
- phpunit --coverage-text
17+
- vendor/bin/phpunit --coverage-text

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Async HTTP CONNECT proxy connector, use any TCP/IP protocol through an HTTP prox
1010
* [create()](#create)
1111
* [ProxyConnector](#proxyconnector)
1212
* [Install](#install)
13+
* [Tests](#tests)
1314
* [License](#license)
1415
* [More](#more)
1516

@@ -178,6 +179,21 @@ $ composer require clue/http-proxy-react:^0.1
178179

179180
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
180181

182+
## Tests
183+
184+
To run the test suite, you first need to clone this repo and then install all
185+
dependencies [through Composer](http://getcomposer.org):
186+
187+
```bash
188+
$ composer install
189+
```
190+
191+
To run the test suite, go to the project root and run:
192+
193+
```bash
194+
$ php vendor/bin/phpunit
195+
```
196+
181197
## License
182198

183199
MIT

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"ringcentral/psr7": "^1.2"
2626
},
2727
"require-dev": {
28+
"phpunit/phpunit": "^5.0 || ^4.8",
2829
"react/socket-client": "^0.5",
2930
"clue/block-react": "^1.1"
3031
}

tests/AbstractTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected function expectCallableOnceParameter($type)
5353
*/
5454
protected function createCallableMock()
5555
{
56-
return $this->getMock('Tests\\Clue\\React\\HttpProxy\\CallableStub');
56+
return $this->getMockBuilder('Tests\\Clue\\React\\HttpProxy\\CallableStub')->getMock();
5757
}
5858
}
5959

tests/ProxyConnectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ProxyConnectorTest extends AbstractTestCase
1212

1313
public function setUp()
1414
{
15-
$this->connector = $this->getMock('React\SocketClient\ConnectorInterface');
15+
$this->connector = $this->getMockBuilder('React\SocketClient\ConnectorInterface')->getMock();
1616
}
1717

1818
/**

0 commit comments

Comments
 (0)