mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Updated run scripts for tests.
This commit is contained in:
parent
00d059b8df
commit
c2e04a11bf
39
cover.sh
39
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
|
||||
|
40
pu.sh
40
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
|
||||
|
Loading…
Reference in New Issue
Block a user