How can I make sure that when I'm testing in Laravel with phpunit and for example I want to test my api route /test/1
it uses my test database?
I already made a test connection and changed my phpunit.xml file. I changed DB_CONNECTION
to the test connection that I made.
<env name="DB_CONNECTION" value="mysql_testing"/>
But it when I make a post request I receive data from the development database?
Aucun commentaire:
Enregistrer un commentaire