Fix some tests.

This commit is contained in:
James Cole
2016-12-09 16:30:33 +01:00
parent 3f56a8ec53
commit cf34713518
6 changed files with 26 additions and 129 deletions

10
test.sh
View File

@@ -11,8 +11,9 @@ resetestflag=''
testflag=''
coverageflag=''
acceptancetestclass=''
verbalflag=''
while getopts 'crta:' flag; do
while getopts 'vcrta:' flag; do
case "${flag}" in
r)
resetestflag='true'
@@ -23,6 +24,9 @@ while getopts 'crta:' flag; do
c)
coverageflag='true'
;;
v)
verbalflag=' -v'
;;
a)
acceptancetestclass=./tests/acceptance/$OPTARG
echo "Will only run acceptance test $OPTARG"
@@ -82,10 +86,10 @@ else
if [[ $coverageflag == "" ]]
then
echo "Must run PHPUnit without coverage"
phpunit $acceptancetestclass
phpunit --stop-on-error $verbalflag $acceptancetestclass
else
echo "Must run PHPUnit with coverage"
phpunit --configuration phpunit.coverage.xml $acceptancetestclass
phpunit --stop-on-error $verbalflag --configuration phpunit.coverage.xml $acceptancetestclass
fi
fi