I have a MySQL database on my local machine that I use for development. Up to now, I've been using sqlite in-memory databases for my testing, but I want to test my suite against a MySQL database. I've set up a new connection that uses the same details as my local development MySQL, but with a different database name. If I try to run a test, I get the following error:
Illuminate\Database\QueryException : SQLSTATE[HY000]  Unknown database 'app_testing' (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')
Ok, no problem - I'll make the database:
create database app_testing
But when I run the tests this time, I get the following error:
Illuminate\Database\QueryException : Database (app_testing) does not exist.
What's going on here? The app can see the database, so why can't PHPUnit? It must be able to some degree to change the error. Any advice would be appreciated.