mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 12:14:36 +00:00
Use phpunit from vendor directory when available
Error message:
tests/script.sh: line 17: phpunit: command not found
This commit is contained in:
+9
-2
@@ -13,9 +13,16 @@ source "check_syntax.sh"
|
||||
# Let test server know we should allow testing.
|
||||
export PHP_CURL_CLASS_TEST_MODE_ENABLED="yes"
|
||||
|
||||
# Determine which phpunit to use.
|
||||
if [[ -f "vendor/bin/phpunit" ]]; then
|
||||
phpunit_to_use="vendor/bin/phpunit"
|
||||
else
|
||||
phpunit_to_use="phpunit"
|
||||
fi
|
||||
|
||||
# Run tests.
|
||||
phpunit --version
|
||||
phpunit --configuration "phpunit.xml" --debug --verbose
|
||||
"${phpunit_to_use}" --version
|
||||
"${phpunit_to_use}" --configuration "phpunit.xml" --debug --verbose
|
||||
if [[ "${?}" -ne 0 ]]; then
|
||||
echo "Error: phpunit command failed"
|
||||
((errors++))
|
||||
|
||||
Reference in New Issue
Block a user