PDOException: could not find driver (for SQLite)

Posted 1 week ago by TimeSocks

Howdy,

I've just started a fresh Laravel project, looking to approach it from a TDD point of view. With that in mind, I have setup a simple test, and as per the Birdboard series have set phpunit to use an sqlite database for testing in phpunit.xml

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

However, when I run my test, I get an error caused by:

PDOException: could not find driver

Sqlite is installed on my system (I went and got it and installed it) though the executable only works from the folder I extracted it to. How can I get it working with Laravel?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.