G
G
Gleb Starkov2020-06-20 12:54:25
PHPUnit
Gleb Starkov, 2020-06-20 12:54:25

SQLSTATE[HY000]: General error: 1 no such table: users (SQL: select count(*) as aggregate from "users" where "email" = [email protected])?

Testing API on Laravel.
When trying to register a user, the error is as in the subject of the question.
Migrations roll without problems, the users table is in the database.
The project is built on docker-compose.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gleb Starkov, 2020-06-20
@colonel

In general, I decided this way, in the use section I added:

use Illuminate\Foundation\Testing\DatabaseMigrations;

In the test class itself:
use DatabaseMigrations;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question