Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3917

Symfony 4.3 Unit Tests Not Using Test DB

$
0
0

I am having problems getting my Symfony 4.3 app to use a test database for unit tests.

I have been through the documentation on the Symfony website for setting up a database for testing but I must be missing something as it doesn't seem to work. The tests write data to the DB but they are still using the main DB.

I am using Sqlite and this is what I have added to .env.test

DATABASE_URL=sqlite:///%kernel.project_dir%/var/data_test.db

I have tried other methods from various sites including some answers on SO but they don't work for me.

Any help would be much appreciated.


Viewing all articles
Browse latest Browse all 3917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>