diff --git a/.travis.yml b/.travis.yml index 5d6176ed..4e4c70f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,8 +37,8 @@ script: after_success: - rm -f build/clover.xml - - wget https://phar.phpunit.de/phpcov-6.0.1.phar - - phpdbg -qrr phpcov-6.0.1.phar merge build --clover build/clover.xml + - wget https://phar.phpunit.de/phpcov-7.0.1.phar + - phpdbg -qrr phpcov-7.0.1.phar merge build --clover build/clover.xml - wget https://scrutinizer-ci.com/ocular.phar - php ocular.phar code-coverage:upload --format=php-clover build/clover.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ed83602..edf73367 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this #### Changed -* *Nothing* +* [#656](https://github.com/shlinkio/shlink/issues/656) Updated to PHPUnit 9. #### Deprecated diff --git a/bin/test/run-api-tests.sh b/bin/test/run-api-tests.sh index 2a14b218..fae0c628 100755 --- a/bin/test/run-api-tests.sh +++ b/bin/test/run-api-tests.sh @@ -9,7 +9,7 @@ echo 'Starting server...' vendor/bin/mezzio-swoole start -d sleep 2 -vendor/bin/phpunit --order-by=random -c phpunit-api.xml --testdox --colors=always $* +phpdbg -qrr vendor/bin/phpunit --order-by=random -c phpunit-api.xml --testdox --colors=always $* testsExitCode=$? vendor/bin/mezzio-swoole stop diff --git a/composer.json b/composer.json index f26c9eec..cdda9028 100644 --- a/composer.json +++ b/composer.json @@ -58,14 +58,14 @@ }, "require-dev": { "devster/ubench": "^2.0", - "dms/phpunit-arraysubset-asserts": "^0.1.0", + "dms/phpunit-arraysubset-asserts": "^0.2.0", "eaglewu/swoole-ide-helper": "dev-master", "infection/infection": "^0.15.0", "phpstan/phpstan": "^0.12.3", - "phpunit/phpunit": "^8.3", + "phpunit/phpunit": "^9.0.1", "roave/security-advisories": "dev-master", "shlinkio/php-coding-standard": "~2.1.0", - "shlinkio/shlink-test-utils": "^1.3", + "shlinkio/shlink-test-utils": "^1.4", "symfony/var-dumper": "^5.0" }, "autoload": { @@ -107,7 +107,7 @@ "test:ci": [ "@test:unit:ci", "@test:db:ci", - "@test:api" + "@test:api:ci" ], "test:unit": "phpdbg -qrr vendor/bin/phpunit --order-by=random --colors=always --coverage-php build/coverage-unit.cov --testdox", "test:unit:ci": "@test:unit --coverage-clover=build/clover.xml --coverage-xml=build/coverage-xml --log-junit=build/junit.xml", @@ -129,6 +129,7 @@ "test:db:postgres": "DB_DRIVER=postgres composer test:db:sqlite", "test:db:ms": "DB_DRIVER=mssql composer test:db:sqlite", "test:api": "bin/test/run-api-tests.sh", + "test:api:ci": "@test:api --coverage-php build/coverage-api.cov", "test:unit:pretty": "phpdbg -qrr vendor/bin/phpunit --order-by=random --colors=always --coverage-html build/coverage", "infect": "infection --threads=4 --min-msi=80 --log-verbosity=default --only-covered", "infect:ci": "@infect --coverage=build",