firefly-iii/cover.sh

27 lines
441 B
Bash
Raw Normal View History

2016-01-17 08:48:18 -06:00
#!/bin/bash
# set testing environment
cp .env.testing .env
# set cover:
cp phpunit.cover.xml phpunit.xml
2016-01-19 09:55:02 -06:00
# delete test databases:
if [ -f storage/database/testing.db ]
2016-01-17 08:48:18 -06:00
then
2016-01-19 09:55:02 -06:00
rm storage/database/testing.db
2016-01-17 08:48:18 -06:00
fi
2016-01-19 09:55:02 -06:00
if [ -f storage/database/testing-copy.db ]
then
rm storage/database/testing-copy.db
fi
# test!
phpdbg -qrr /usr/local/bin/phpunit
2016-01-17 08:48:18 -06:00
# restore .env file
cp .env.local .env
# restore cover
cp phpunit.default.xml phpunit.xml