diff --git a/.gitattributes b/.gitattributes index c2a942e..cb84257 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,4 +3,5 @@ /.gitignore export-ignore /bin/build.php export-ignore /phpunit.xml.dist export-ignore +/phpunit.xml.legacy export-ignore /tests/ export-ignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf5fe14..e6e791f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,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 }} - run: composer build PHPUnit-hhvm: diff --git a/composer.json b/composer.json index 107b7b2..e4185a2 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ }, "require-dev": { "clue/phar-composer": "^1.3", - "phpunit/phpunit": "^4.8.36" + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.36" }, "autoload": { "psr-0": { "Clue\\GraphComposer": "src/" } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 7d716bb..2aefcaa 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,14 +1,20 @@ - + + ./tests/ - - - ./src - - - \ No newline at end of file + + + ./src/ + + + diff --git a/phpunit.xml.legacy b/phpunit.xml.legacy new file mode 100644 index 0000000..601ecb5 --- /dev/null +++ b/phpunit.xml.legacy @@ -0,0 +1,18 @@ + + + + + + + ./tests/ + + + + + ./src/ + + + diff --git a/tests/AppTest.php b/tests/AppTest.php index 7f45f8d..371f6ae 100644 --- a/tests/AppTest.php +++ b/tests/AppTest.php @@ -1,8 +1,9 @@