diff --git a/.travis.yml b/.travis.yml index 849fcda..d0dc010 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,5 @@ language: php -php: -# - 5.3 # requires old distro - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - - hhvm # ignore errors, see below - # lock distro so new future defaults will not break the build dist: trusty @@ -18,8 +7,19 @@ matrix: include: - php: 5.3 dist: precise + - php: 5.4 + - php: 5.5 + - php: 5.6 + - php: 7.0 + - php: 7.1 + - php: 7.2 + - php: 7.3 + - php: 7.4 + - php: hhvm-3.18 + install: + - composer require phpunit/phpunit:^5 --dev --no-interaction # requires legacy phpunit allow_failures: - - php: hhvm + - php: hhvm-3.18 sudo: false diff --git a/composer.json b/composer.json index 45e3d38..4c296fe 100644 --- a/composer.json +++ b/composer.json @@ -13,11 +13,14 @@ "autoload": { "psr-4": { "Clue\\React\\Buzz\\": "src/" } }, + "autoload-dev": { + "psr-4": { "Clue\\Tests\\React\\Buzz\\": "tests/" } + }, "require": { "php": ">=5.3", "psr/http-message": "^1.0", "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3", - "react/http-client": "^0.5.8", + "react/http-client": "^0.5.10", "react/promise": "^2.2.1 || ^1.2.1", "react/promise-stream": "^1.0 || ^0.1.1", "react/promise-timer": "^1.2", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e89b186..49fd029 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,6 +1,6 @@ -sender = $this->getMockBuilder('Clue\React\Buzz\Io\Transaction')->disableOriginalConstructor()->getMock(); $this->browser = new Browser($this->loop); - $ref = new ReflectionProperty($this->browser, 'transaction'); + $ref = new \ReflectionProperty($this->browser, 'transaction'); $ref->setAccessible(true); $ref->setValue($this->browser, $this->sender); } diff --git a/tests/FunctionalBrowserTest.php b/tests/FunctionalBrowserTest.php index 8101691..fe4a5f2 100644 --- a/tests/FunctionalBrowserTest.php +++ b/tests/FunctionalBrowserTest.php @@ -1,8 +1,11 @@ getMockBuilder('React\Socket\ConnectorInterface')->getMock(); - $connector->expects($this->once())->method('connect')->willReturn(Promise\reject(new RuntimeException('Rejected'))); + $connector->expects($this->once())->method('connect')->willReturn(Promise\reject(new \RuntimeException('Rejected'))); $sender = new Sender(new HttpClient($this->loop, $connector), $this->getMockBuilder('Clue\React\Buzz\Message\MessageFactory')->getMock()); diff --git a/tests/Io/TransactionTest.php b/tests/Io/TransactionTest.php index c1f608c..284e2df 100644 --- a/tests/Io/TransactionTest.php +++ b/tests/Io/TransactionTest.php @@ -1,10 +1,13 @@ assertInstanceOf('Clue\React\Buzz\Io\Transaction', $new); $this->assertNotSame($transaction, $new); - $ref = new ReflectionProperty($new, 'followRedirects'); + $ref = new \ReflectionProperty($new, 'followRedirects'); $ref->setAccessible(true); $this->assertFalse($ref->getValue($new)); @@ -39,7 +42,7 @@ public function testWithOptionsDoesNotChangeOriginalInstance() $transaction->withOptions(array('followRedirects' => false)); - $ref = new ReflectionProperty($transaction, 'followRedirects'); + $ref = new \ReflectionProperty($transaction, 'followRedirects'); $ref->setAccessible(true); $this->assertTrue($ref->getValue($transaction)); @@ -54,7 +57,7 @@ public function testWithOptionsNullValueReturnsNewInstanceWithDefaultOption() $transaction = $transaction->withOptions(array('followRedirects' => false)); $transaction = $transaction->withOptions(array('followRedirects' => null)); - $ref = new ReflectionProperty($transaction, 'followRedirects'); + $ref = new \ReflectionProperty($transaction, 'followRedirects'); $ref->setAccessible(true); $this->assertTrue($ref->getValue($transaction)); diff --git a/tests/Message/MessageFactoryTest.php b/tests/Message/MessageFactoryTest.php index f0a6f56..f46c933 100644 --- a/tests/Message/MessageFactoryTest.php +++ b/tests/Message/MessageFactoryTest.php @@ -1,6 +1,9 @@