Welcome Guest, Not a member yet? Register   Sign In
Running automated tests with mysql database possible?
#2

(03-01-2020, 02:06 AM)tgix Wrote: 2) Took me some time to find the overridden envs in phpunit.xml.dist to use sqlite3. 
Why are they there?

Are you asking, "Why use sqlite3?"

Your experience should provide the answer, it's not as "time consuming".

Unit testing database code is a bear. You really don't have a choice on refreshing for every test. It has to be done or you cannot trust the state of the db when it comes time to assert something.

This page is old PHP Unit documentation, but it's still informative. The same page doesn't exist in the docs for version 8.5, the version CI v4 uses. I'm not sure why.
Reply


Messages In This Thread
RE: Running automated tests with mysql database possible? - by dave friend - 03-01-2020, 11:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB