which phpunit

This commit is contained in:
Mike Jolley 2019-06-11 11:05:53 +01:00
parent 73e5c5d951
commit 759feffbee
3 changed files with 5 additions and 6 deletions

View File

@ -13,10 +13,10 @@ matrix:
before_script:
- phpenv config-rm xdebug.ini
- export PATH="$WP_CORE_DIR/wp-content/plugins/woocommerce-rest-api/vendor/bin:$PATH"
- bash unit-tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION
script:
- composer install
- export PATH="$WP_CORE_DIR/wp-content/plugins/woocommerce-rest-api/vendor/bin:$PATH"
- bash unit-tests/bin/phpunit.sh
- bash unit-tests/bin/phpcs.sh

View File

@ -6,7 +6,6 @@ if [[ ${RUN_PHPCS} == 1 ]]; then
if [ "$CHANGED_FILES" != "" ]; then
echo "Running Code Sniffer."
cd "$WP_CORE_DIR/wp-content/plugins/woocommerce-rest-api/"
./vendor/bin/phpcs --ignore=$IGNORE --encoding=utf-8 -s -n -p $CHANGED_FILES
phpcs --ignore=$IGNORE --encoding=utf-8 -s -n -p $CHANGED_FILES
fi
fi

View File

@ -1,9 +1,9 @@
#!/usr/bin/env bash
WORKING_DIR="$PWD"
cd "$WP_CORE_DIR/wp-content/plugins/woocommerce-rest-api/"
pwd
./vendor/bin/phpunit --version
./vendor/bin/phpunit -c phpunit.xml
which phpunit
phpunit --version
phpunit -c phpunit.xml
TEST_RESULT=$?
cd "$WORKING_DIR"
exit $TEST_RESULT