2019-06-28 03:54:06 +00:00
|
|
|
install:
|
2019-06-28 05:21:55 +00:00
|
|
|
command -v composer && composer install || echo "Please, install Composer to use tests"
|
|
|
|
command -v phpunit || command -v composer && composer require --dev phpunit/phpunit ^8
|
2019-06-28 03:54:06 +00:00
|
|
|
chmod +x ./pre-push.sh
|
|
|
|
mkdir -p .git/hooks
|
|
|
|
ln -fs ../../pre-push.sh .git/hooks/pre-push
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f ./.git/hooks/pre-push
|
2019-06-28 05:21:55 +00:00
|
|
|
if [ -d "./vendor/phpunit" ] ; then composer remove --dev phpunit/phpunit; fi
|
2022-12-23 03:27:03 +00:00
|
|
|
|
|
|
|
check:
|
|
|
|
gaze '{src,tests}/**/*.php' -c "./vendor/phpunit/phpunit/phpunit --bootstrap vendor/autoload.php tests --testdox --color"
|