Level 102
Not quite. https://www.aaronsaray.com/2019/stop-using-sqlite-in-laravel-unit-tests
I personally switched to use a real mysql database because of issues like the one you are facing and others
1 like
Hello. Making phpunit tests for laravel 8 app I found error :
Sqlite does not support dropping foreign keys (you would need to recreate the table)
I was raised by line in migration file :
Schema::table('tables', function (Blueprint $table) {
$table->dropForeign('tables_category_id_foreign');
...
That raised a question are sqlite and my sql 100% compatible in phpunit ?
Laravel Framework 8.83.21
SQLite Library 3.31.1
mysqlnd 8.1.3
In phpunit.xml :
<server name="CACHE_DRIVER" value="array"/>
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/>
Thanks!
Not quite. https://www.aaronsaray.com/2019/stop-using-sqlite-in-laravel-unit-tests
I personally switched to use a real mysql database because of issues like the one you are facing and others
Please or to participate in this conversation.