Nov 2, 2015
0
Level 1
Lumen testing with SQLite
First off, this is my first application using Lumen and It's awesome!
But I've ran into a little problem that I can't figure out how to solve. I've google for about an hour before I posted this but if this is a duplicate, feel free to link me to the solution.
I'm loading my .env file for the regular applicaiton with MySQL but in testing i want to use SQLLite with the DatabaseMigrations.
My phpunit.xml looks like this:
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
<env name="DB_DRIVER" value="sqlite" />
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value="database.sqlite"/>
But for some reason when I dump $_ENV in my testcase i get those values but also the values which are not overwriten form my regular .env file. Why and How do I setup so that the tests only use SQLite?
Please or to participate in this conversation.