From 0563e4cc0f63f2d03117c4d977bce3f0e50c7d12 Mon Sep 17 00:00:00 2001 From: Simon Frings Date: Mon, 6 Sep 2021 11:17:44 +0200 Subject: [PATCH 1/3] Run tests on PHPUnit 9 --- composer.json | 2 +- phpunit.xml.dist | 3 +-- tests/bootstrap.php | 3 --- tests/unit/ConnectorTest.php | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 tests/bootstrap.php diff --git a/composer.json b/composer.json index 76aa6c3..e488fa6 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ , "ratchet/rfc6455": "^0.3" } , "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8" } , "suggest": { "reactivex/rxphp": "~2.0" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e23d1d5..810b8b2 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,7 @@ getMock('React\Socket\ConnectorInterface'); + $connector = $this->getMockBuilder('React\Socket\ConnectorInterface')->getMock(); $connector->expects($this->once()) ->method('connect') From 2917cfbb67aaa2e1f494d5182caf5253d3486d6e Mon Sep 17 00:00:00 2001 From: Simon Frings Date: Mon, 6 Sep 2021 11:25:29 +0200 Subject: [PATCH 2/3] Update PHPUnit configuration schema for PHPUnit 9.3 --- .github/workflows/ci.yml | 3 +++ phpunit.xml.dist | 29 ++++++++++++++--------------- phpunit.xml.legacy | 22 ++++++++++++++++++++++ 3 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 phpunit.xml.legacy diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bb75f0..57422de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,9 @@ jobs: coverage: xdebug - run: composer install - run: vendor/bin/phpunit --coverage-text + if: ${{ matrix.php >= 7.3 }} + - run: vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy + if: ${{ matrix.php < 7.3 }} PHPUnit-hhvm: name: PHPUnit (HHVM) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 810b8b2..08c041f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,23 +1,22 @@ - + - + bootstrap="vendor/autoload.php" + cacheResult="false" + colors="true" + stopOnError="false"> - ./tests/unit/ + ./tests/ - - - + + ./src/ - - - \ No newline at end of file + + + diff --git a/phpunit.xml.legacy b/phpunit.xml.legacy new file mode 100644 index 0000000..dd7205b --- /dev/null +++ b/phpunit.xml.legacy @@ -0,0 +1,22 @@ + + + + + + + ./tests/ + + + + + ./src/ + + + From 4c889249a2eb5c6dba6c97ad384532f755aa6ad3 Mon Sep 17 00:00:00 2001 From: Simon Frings Date: Mon, 6 Sep 2021 11:27:06 +0200 Subject: [PATCH 3/3] Run tests on PHP 8 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57422de..a13804b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ jobs: strategy: matrix: php: + - 8.0 - 7.4 - 7.3 - 7.2