Skip to content

Instantly share code, notes, and snippets.

@davidromani
Last active September 25, 2016 09:14
Show Gist options
  • Save davidromani/d38fad4d783392113505332ca401c4e4 to your computer and use it in GitHub Desktop.
Save davidromani/d38fad4d783392113505332ca401c4e4 to your computer and use it in GitHub Desktop.
Symfony test bash script helper
#!/bin/bash
echo "Started at `date +"%T %d/%m/%Y"`"
if [ -z "$1" ]
then
phpunit -c app/
else
if [ "$1" = "cc" -o "$1" = "coverage" ]
then
if [ "$1" = "cc" ]
then
php app/console ca:cl --env=test && phpunit -c app/
else
phpunit -c app/ --coverage-text
fi
else
echo "Argument error! Available argument options: 'cc' or 'coverage'"
fi
fi
echo "Finished at `date +"%T %d/%m/%Y"`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment