1
votes

I have installed php7.1.7 in my Windows. New Laravel 5.4 install; tried configuring phpunit to use in-memory sqlite db as such

    <env name="APP_ENV" value="testing"/>
    <env name="DB_CONNECTION" value="sqlite"/>
    <env name="DB_DATABASE" value=":memory:"/>

running vendor/bin/phpunit fails with:

1) Tests\Feature\ThreadsTest::a_user_can_browse_threads Illuminate\Database\QueryException: could not find driver (SQL: select * from sqlite_master where type = 'table' and name = migrations)

If I try another value for DB_DATABASE, other than ':memory:' it fails with a database not found error, but not the 'could not find driver' error

1
You have to enable the sqlite driver in php.ini, than restart apache. - Jeffrey

1 Answers

2
votes

open php.ini file. enable php_pdo_sqlite.dll by removing semicolon