Skip to content

Commit

Permalink
Forward compatibility with PHPUnit 7 and use legacy PHPUnit 5 on HHVM
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Feb 4, 2019
1 parent d01ab2b commit 56108b9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ php:
- 7.0
- 7.1
- 7.2
- hhvm # ignore errors, see below
- 7.3
# - hhvm # requires legacy phpunit & ignore errors, see below

# lock distro so new future defaults will not break the build
dist: trusty

matrix:
include:
- php: hhvm
install: composer require phpunit/phpunit:^5 --dev --no-interaction
allow_failures:
- php: hhvm

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"require-dev": {
"clue/block-react": "^1.2",
"phpunit/phpunit": "^4.8.35"
"phpunit/phpunit": "^7.0 || ^6.0 || ^5.0 || ^4.8.35"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="vendor/autoload.php"
>
<testsuites>
Expand Down
3 changes: 3 additions & 0 deletions tests/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ public function testConnectLazyWithValidAuthWillRunUntilQuitAfterPing()
$loop->run();
}

/**
* @doesNotPerformAssertions
*/
public function testConnectLazyWithValidAuthWillRunUntilIdleTimerAfterPingEvenWithoutQuit()
{
$loop = \React\EventLoop\Factory::create();
Expand Down
3 changes: 2 additions & 1 deletion tests/Io/BufferTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

namespace React\Tests\MySQL\Io;

use PHPUnit\Framework\TestCase;
use React\MySQL\Io\Buffer;

class BufferTest extends \PHPUnit_Framework_TestCase
class BufferTest extends TestCase
{
public function testAppendAndReadBinary()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Io/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

namespace React\Tests\MySQL\Io;

use PHPUnit\Framework\TestCase;
use React\MySQL\Io\Query;

class QueryTest extends \PHPUnit_Framework_TestCase
class QueryTest extends TestCase
{
public function testBindParams()
{
Expand Down

0 comments on commit 56108b9

Please sign in to comment.