Use vendor phpunit when available

This commit is contained in:
Zach Borboa
2020-04-11 12:19:12 -07:00
parent 85c9a1a5e9
commit 2c6d228f58
+11 -1
View File
@@ -6,10 +6,20 @@ set -x
# Let test server know we should allow testing.
export PHP_CURL_CLASS_TEST_MODE_ENABLED="yes"
# Start test server.
php -S 127.0.0.1:8000 -t PHPCurlClass/ &> /dev/null &
pid="${!}"
# Determine which phpunit to use.
if [[ -f "../vendor/phpunit/phpunit/phpunit" ]]; then
phpunit_to_use="../vendor/phpunit/phpunit/phpunit"
else
phpunit_to_use="phpunit"
fi
# Run tests.
extra_args="${@}"
phpunit \
"${phpunit_to_use}" \
--configuration "phpunit.xml" \
--debug \
--verbose \