diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc7690e..4df196a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,4 @@ jobs: php-version: ${{ matrix.php }} 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 }} + - run: vendor/bin/phpunit --coverage-text ${{ matrix.php < 7.3 && '-c phpunit.xml.legacy' || '' }} diff --git a/composer.json b/composer.json index 40dbaee..76e16f1 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "require-dev": { "clue/hexdump": "~0.2.0", "react/event-loop": "^1.2", - "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + "phpunit/phpunit": "^9.6 || ^8.5 || ^5.7 || ^4.8.36" }, "autoload": { "psr-4": { diff --git a/tests/TestCase.php b/tests/TestCase.php index 7ccc770..94f88ff 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -31,10 +31,10 @@ protected function expectCallableNever() protected function createCallableMock() { if (method_exists('PHPUnit\Framework\MockObject\MockBuilder', 'addMethods')) { - // PHPUnit 9+ + // PHPUnit 8.5+ return $this->getMockBuilder('stdClass')->addMethods(array('__invoke'))->getMock(); } else { - // legacy PHPUnit 4 - PHPUnit 8 + // legacy PHPUnit 4 - PHPUnit 8.4 return $this->getMockBuilder('stdClass')->setMethods(array('__invoke'))->getMock(); } }