I'm started to write tests in Laravel. My application works, I can login, run migrations, but when I'm trying to test the login, I'm getting the following error:
could not find driver (SQL: PRAGMA foreign_keys = ON;)
My DB is in Postgres, and my test is as follows:
/** @test */
public function user_login_ok()
{
$response = $this->json('POST', '/api/login', [
'email' => '[email protected]',
'password' => 'test'
]);
$this->assertEquals(200, $response->getStatusCode());
}
I'm not worried (for now) if my test is good enough or even right, but to solve this error.
phpsection? If yes, these settings could be trying to use a database connection you do not have set up.