Any chance your $connection is set on the model?
Oct 17, 2020
6
Level 3
phpunit not using in memory sqlite
Hi, I've just started the 'Let's Build A Forum with Laravel and TDD' series, and am unable to get the tests running using the sqlite in memory database. Using Laragon if that makes any difference.
include in the php tag in phpunit.xml
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/>
Running 'php artisan test' results in the data being added to the mysql database and not the sqlite in memory.
If anyone has any ideas, thanks.
Level 102
Any chance you cached config?
php artisan config:clear
2 likes
Please or to participate in this conversation.