PDOException: could not find driver when using phpunit

If you are occupying SqLite you have to enter php.init and uncomment this line.

;extension = pdo_sqlite

On Windows i had to activate extension=php_pdo_sqlite.dll in php.ini.


If you are using sqlite for testing you will need php sqlite drivers

For Ubuntu 14.04

sudo apt-get install php5-sqlite
sudo service apache2 restart

In ubuntu 16.04 there is no php5-sqlite

sudo apt-get install php7.0-sqlite
sudo service apache2 restart

It seems Laravel using SQLite as database for testing. See the backtrace at line 2:

/var/www/smlsspd/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php:22

But this seems not installed on your system. So I think you need to install the SQLite driver.