Permalink
Browse files

Improve the Travis setup to work on recent PHP versions

  • Loading branch information...
stof committed Nov 18, 2017
1 parent db5c28f commit 4fc80486201d36e2d133329ef8f841f588f670b5
Showing with 27 additions and 12 deletions.
  1. +16 −8 .travis.yml
  2. +6 −3 Goutte/Tests/ClientTest.php
  3. +5 −1 composer.json
View
@@ -1,18 +1,26 @@
language: php
sudo: false
cache:
- $HOME/composer/cache/files
- $HOME/.phpunit_bridge
env:
global:
- SYMFONY_PHPUNIT_DIR=$HOME/.phpunit_bridge
php:
- 7.2
- 7.1
- 7.0
- 5.6
- 5.5
- hhvm
- nightly
install:
- travis_retry composer install --no-interaction --prefer-source
- composer update
- vendor/bin/simple-phpunit install
script:
- phpunit
matrix:
allow_failures:
- php: hhvm
- php: 7.0
- vendor/bin/simple-phpunit
@@ -18,6 +18,7 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response as GuzzleResponse;
use GuzzleHttp\Middleware;
use PHPUnit\Framework\TestCase;
use Symfony\Component\BrowserKit\Cookie;
/**
@@ -26,7 +27,7 @@
* @author Michael Dowling <michael@guzzlephp.org>
* @author Charles Sarrazin <charles@sarraz.in>
*/
class ClientTest extends \PHPUnit_Framework_TestCase
class ClientTest extends TestCase
{
protected $history;
/** @var MockHandler */
@@ -337,11 +338,13 @@ public function testConvertsGuzzleHeadersToArrays()
$this->assertInternalType('array', array_shift($headers), 'Header not converted from Guzzle\Http\Message\Header to array');
}
/**
* @expectedException \GuzzleHttp\Exception\RequestException
*/
public function testNullResponseException()
{
$this->setExpectedException('GuzzleHttp\Exception\RequestException');
$guzzle = $this->getGuzzle([
new RequestException('', $this->getMock('Psr\Http\Message\RequestInterface')),
new RequestException('', $this->getMockBuilder('Psr\Http\Message\RequestInterface')->getMock()),
]);
$client = new Client();
$client->setClient($guzzle);
View
@@ -18,8 +18,12 @@
"symfony/dom-crawler": "~2.1|~3.0",
"guzzlehttp/guzzle": "^6.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^3.3 || ^4"
},
"autoload": {
"psr-4": { "Goutte\\": "Goutte" }
"psr-4": { "Goutte\\": "Goutte" },
"exclude-from-classmap": ["Goutte/Tests"]
},
"extra": {
"branch-alias": {

0 comments on commit 4fc8048

Please sign in to comment.