DEV Community 👩‍💻👨‍💻

Discussion on: Tips for testing the database in Symfony application

jmsche profile image

Hi, I would not recommend to test against a different database system than the one you really use in your app (eg. your app runs against Postgres and your tests against SQLite in this example) as the behaviours can defer.

vikbert profile image
Xun Zhou

yes, your are absolute right. SQLite will not be able to replace the MysQL or PostgreSQL DB, because of its limited features. It is actually your decision at the end, if this approach is ok for your current project. If you have very complex Datbase queries, which are not possible in SQLite. It is not recommended to use in-momory DB for DB test. But the project has simple DB schema and simple DB queries, then SQLite in-memory-DB will be a lightweight alternative for your DB tests.