1

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. Commented Sep 2, 2017 at 11:21

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.