Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix test script.
James Cole7ec9c090cc28
diff --git a/.travis.yml b/.travis.ymlindex 0d768b2bcd..efb24c6544 100644--- a/.travis.yml+++ b/.travis.yml@@ -14,7 +14,7 @@ install:- php artisan env- mv -v .env.testing .env- php artisan env- - ./test.sh --notest+ - ./test.sh --notest --resetscript:- phpunit\ No newline at end of filediff --git a/test.sh b/test.shindex 0ece8440dc..ba4bde7d36 100755--- a/test.sh+++ b/test.sh@@ -1,19 +1,24 @@#!/bin/bash-DATABASE=storage/database/database.sqlite-DATABASECOPY=storage/database/databasecopy.sqlite---# backup current config:-mv .env .env.current+DATABASE=./storage/database/database.sqlite+DATABASECOPY=./storage/database/databasecopy.sqlite+ORIGINALENV=./.env+BACKUPENV=./.env.current+TESTINGENV=./.env.testing++# backup current config (if it exists):+if [ -f $ORIGINALENV ]; then+ mv $ORIGINALENV $BACKUPENV+fi# enable testing config-cp .env.testing .env+cp $TESTINGENV $ORIGINALENV# clear cache:php artisan cache:clear-if [ "$1" == "--reset" ]; then+if [[ "$@" == "--reset" ]]+thenecho "Must reset database"# touch files to make sure they exist.@@ -34,11 +39,14 @@ ficp $DATABASECOPY $DATABASE# run PHPUnit-if [ "$1" == "--notest" ]; then+if [[ "$@" == "--notest" ]]+thenecho "Must not run PHPUnit"elsephpunitfi# restore current config:-mv .env.current .env\ No newline at end of file+if [ -f $BACKUPENV ]; then+ mv $BACKUPENV $ORIGINALENV+fi\ No newline at end of file