diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6239b6..9a2155b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,10 +31,7 @@ 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' || '' }} PHPUnit-hhvm: name: PHPUnit (HHVM) diff --git a/composer.json b/composer.json index 44e4833..5c4f404 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,6 @@ "react/promise": "^2.0 || ^1.0" }, "require-dev": { - "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + "phpunit/phpunit": "^9.6 || ^8.5 || ^5.7 || ^4.8.36" } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 16e9d25..fb6cade 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -28,10 +28,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(); } }