2016-01-16 02:15:24 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# set testing environment
|
|
|
|
cp .env.testing .env
|
|
|
|
|
2016-01-19 11:09:53 -06:00
|
|
|
# set default phpunit.
|
|
|
|
cp phpunit.default.xml phpunit.xml
|
|
|
|
|
2016-01-19 09:55:02 -06:00
|
|
|
# delete test databases:
|
|
|
|
if [ -f storage/database/testing.db ]
|
2016-01-16 02:15:24 -06:00
|
|
|
then
|
2016-01-19 09:55:02 -06:00
|
|
|
rm storage/database/testing.db
|
2016-01-16 02:15:24 -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!
|
|
|
|
phpunit
|
2016-01-16 02:15:24 -06:00
|
|
|
|
|
|
|
# restore .env file
|
|
|
|
cp .env.local .env
|