Skip to content

Commit 2c6d228

Browse files
committed
Use vendor phpunit when available
1 parent 85c9a1a commit 2c6d228

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/run.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,20 @@ set -x
66
# Let test server know we should allow testing.
77
export PHP_CURL_CLASS_TEST_MODE_ENABLED="yes"
88

9+
# Start test server.
910
php -S 127.0.0.1:8000 -t PHPCurlClass/ &> /dev/null &
1011
pid="${!}"
12+
13+
# Determine which phpunit to use.
14+
if [[ -f "../vendor/phpunit/phpunit/phpunit" ]]; then
15+
phpunit_to_use="../vendor/phpunit/phpunit/phpunit"
16+
else
17+
phpunit_to_use="phpunit"
18+
fi
19+
20+
# Run tests.
1121
extra_args="${@}"
12-
phpunit \
22+
"${phpunit_to_use}" \
1323
--configuration "phpunit.xml" \
1424
--debug \
1525
--verbose \

0 commit comments

Comments
 (0)