Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHP 7.2 testing #1811

Merged
merged 6 commits into from
May 1, 2017
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
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ php:
- 5.6
- 7.0
- 7.1
- nightly
- hhvm

before_script:
Expand All @@ -21,6 +22,7 @@ script: make test
matrix:
allow_failures:
- php: hhvm
- php: nightly
fast_finish: true

before_deploy:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "^4.0",
"phpunit/phpunit": "^4.0 || ^5.0",
"psr/log": "^1.0"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Handler/MockHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
class MockHandler implements \Countable
{
private $queue;
private $queue = [];
private $lastRequest;
private $lastOptions;
private $onFulfilled;
Expand Down
5 changes: 5 additions & 0 deletions tests/Cookie/CookieJarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ public function testCreatesFromArray()
$this->assertCount(2, $jar);
}

public function testEmptyJarIsCountable()
{
$this->assertCount(0, new CookieJar());
}

public function testGetsCookiesByName()
{
$cookies = $this->getTestCookies();
Expand Down
5 changes: 5 additions & 0 deletions tests/Handler/MockHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ public function testIsCountable()
$this->assertCount(2, $mock);
}

public function testEmptyHandlerIsCountable()
{
$this->assertCount(0, new MockHandler());
}

/**
* @expectedException \InvalidArgumentException
*/
Expand Down
2 changes: 2 additions & 0 deletions tests/Handler/StreamHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ public function testAddsProxy()
public function testAddsProxyByProtocol()
{
$url = str_replace('http', 'tcp', Server::$url);
// Workaround until #1823 is fixed properly
$url = rtrim($url, '/');
$res = $this->getSendResult(['proxy' => ['http' => $url]]);
$opts = stream_context_get_options($res->getBody()->detach());
$this->assertEquals($url, $opts['http']['proxy']);
Expand Down