Store in array to allow paths with whitespace

remotes/origin/poc-doctrine-migrations
Lukas Reschke 9 years ago
parent 8b0c223d6e
commit 89b0bc1915

@ -55,9 +55,9 @@ fi
# PHPUnit might also be installed via a facade binary script # PHPUnit might also be installed via a facade binary script
if [[ "$PHPUNIT" =~ \.phar$ ]]; then if [[ "$PHPUNIT" =~ \.phar$ ]]; then
PHPUNIT="$PHP $PHPUNIT" PHPUNIT=( "$PHP" "$PHPUNIT" )
else else
PHPUNIT="$PHPUNIT" PHPUNIT=( "$PHPUNIT" )
fi fi
PHPUNIT_VERSION=$($PHPUNIT --version | cut -d" " -f2) PHPUNIT_VERSION=$($PHPUNIT --version | cut -d" " -f2)
@ -167,11 +167,11 @@ function execute_tests {
mkdir "coverage-html-$1" mkdir "coverage-html-$1"
"$PHP" -f enable_all.php | grep -i -C9999 error && echo "Error during setup" && exit 101 "$PHP" -f enable_all.php | grep -i -C9999 error && echo "Error during setup" && exit 101
if [ -z "$NOCOVERAGE" ]; then if [ -z "$NOCOVERAGE" ]; then
$PHPUNIT --configuration phpunit-autotest.xml --log-junit "autotest-results-$1.xml" --coverage-clover "autotest-clover-$1.xml" --coverage-html "coverage-html-$1" "$2" "$3" "${PHPUNIT[@]}" --configuration phpunit-autotest.xml --log-junit "autotest-results-$1.xml" --coverage-clover "autotest-clover-$1.xml" --coverage-html "coverage-html-$1" "$2" "$3"
RESULT=$? RESULT=$?
else else
echo "No coverage" echo "No coverage"
$PHPUNIT --configuration phpunit-autotest.xml --log-junit "autotest-results-$1.xml" "$2" "$3" "${PHPUNIT[@]}" --configuration phpunit-autotest.xml --log-junit "autotest-results-$1.xml" "$2" "$3"
RESULT=$? RESULT=$?
fi fi
} }

Loading…
Cancel
Save