OrgManager
We use the Laravel testing functionalities and PHPUnit to add automated testing to OrgManager.
By default, the tests will run in a special database called orgmanager_test
in localhost
with username root
and password root
. If you need to change this, edit the .env.testing
file. This is an example of a customized .env.testing
file:
APP_ENV=testing # don't change this!
APP_KEY=base64:GIkaQ57IIVtTeTQOIh7eAFo1FAcoWkfwYPkfcOyusW4= # this is autogenerated
DB_CONNECTION=sqlite
DB_DATABASE=:memory:
CACHE_DRIVER=array # you shouldn't need to change this
SESSION_DRIVER=array # you shouldn't need to change this
QUEUE_DRIVER=sync # you shouldn't need to change this
Once you've customized your .env.testing file, you have to migrate the database to your test database. You can do this by running
php artisan migrate --env=testing
To run the tests, run
composer test