Skip to content

Firefly III: a personal finances manager

Updated run scripts for tests.

James Colec2e04a11bfd5
diff --git a/cover.sh b/cover.sh
index 4311932be6..d492b09735 100755
--- a/cover.sh
+++ b/cover.sh
@@ -6,38 +6,19 @@ cp .env.testing .env
# set cover:
cp phpunit.cover.xml phpunit.xml
-# test!
-if [ -z "$1" ]
+# delete test databases:
+if [ -f storage/database/testing.db ]
then
- phpdbg -qrr /usr/local/bin/phpunit
+ rm storage/database/testing.db
fi
-# directories to look in:
-#dirs=("controllers" "database" "factories" "generators" "helpers" "models" "middleware" "repositories" "support")
-#
-#if [ ! -z "$1" ]
-#then
-# for i in "${dirs[@]}"
-# do
-# firstFile="./tests/$i/$1.php"
-# secondFile="./tests/$i/$1Test.php"
-# if [ -f "$firstFile" ]
-# then
-# # run it!
-# phpunit --verbose $firstFile
-# exit $?
-# fi
-# if [ -f "$secondFile" ]
-# then
-# # run it!
-# phpunit --verbose $secondFile
-# exit $?
-# fi
-#
-#
-# done
-#
-#fi
+if [ -f storage/database/testing-copy.db ]
+then
+ rm storage/database/testing-copy.db
+fi
+
+# test!
+phpdbg -qrr /usr/local/bin/phpunit
# restore .env file
cp .env.local .env
diff --git a/pu.sh b/pu.sh
index 2f20bcb843..0029a63e66 100755
--- a/pu.sh
+++ b/pu.sh
@@ -3,39 +3,19 @@
# set testing environment
cp .env.testing .env
-# test!
-if [ -z "$1" ]
+# delete test databases:
+if [ -f storage/database/testing.db ]
then
- #phpunit --verbose
- phpunit
+ rm storage/database/testing.db
fi
-# directories to look in:
-#dirs=("controllers" "database" "factories" "generators" "helpers" "models" "middleware" "repositories" "support")
-#
-#if [ ! -z "$1" ]
-#then
-# for i in "${dirs[@]}"
-# do
-# firstFile="./tests/$i/$1.php"
-# secondFile="./tests/$i/$1Test.php"
-# if [ -f "$firstFile" ]
-# then
-# # run it!
-# phpunit --verbose $firstFile
-# exit $?
-# fi
-# if [ -f "$secondFile" ]
-# then
-# # run it!
-# phpunit --verbose $secondFile
-# exit $?
-# fi
-#
-#
-# done
-#
-#fi
+if [ -f storage/database/testing-copy.db ]
+then
+ rm storage/database/testing-copy.db
+fi
+
+# test!
+phpunit
# restore .env file
cp .env.local .env