Skip to content

Instantly share code, notes, and snippets.

@Ulv
Created December 5, 2013 11:48
Show Gist options
  • Save Ulv/7804028 to your computer and use it in GitHub Desktop.
Save Ulv/7804028 to your computer and use it in GitHub Desktop.
git hooks to run phpunit tests for kinetic
#!/usr/bin/env bash
TEST_GLOB='../../tests/test_*.php'
for f in $TEST_GLOB; do
printf "\n+ Running 'phpunit `basename ${f}`'\n\n"
phpunit $f
rc=$?
if [[ $rc != 0 ]] ; then
printf "\n\nSome tests failed!!!\n"
exit $rc
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment