I have and error when I run my test in laravel error : Illuminate\Database\QueryException: could not find driver (SQL: PRAGMA foreign_keys = ON;)
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
use App\Book;
class BookReservationTest extends TestCase { use RefreshDatabase;
/** @test */
public function a_book_can_be_added_to_the_library()
{
$this->withoutExceptionHandling();
$response = $this->post('/books', [
'title' => 'cool book title',
'author' => 'victor'
]);
$response->assertOk();
$this->assertCount(11, Book::all());
}
}
Aucun commentaire:
Enregistrer un commentaire