Possible to change DB Driver on specific test class?
Hello,
my question is same as the title. Is it possible to use a different database driver for one specific test class?
I'm currently using in_memory sqlite for testing, but I have a specific feature I need to test which makes use of MySQL user declared variables using the := assignment operator. The := assignment operator (or maybe user variables) isn't supported by SQLite from what I'm reading online.
I make use of phpunit.xml to setup the testing environment with:
...
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/>
...
It is considered good practice to run the test suite with the actual "stack" of software your production environment will have. I learned this the hard way (cliche) by having "false positives" with SQLite when testing, but crash-n-burn in Production.
Please or to participate in this conversation.