Level 104
You can specify a valid test database connection, username, and password in the phpunit.xml. Do not test against your development database.
1 like
hey everyone i'am trying to run the following test:
public function a_user_can_register()
{
$user = User::factory()->create();
$response = $this->post('/register', $user);
$response->assertRedirect('/register-step-2');
$this->assertDatabaseHas('users', $user);
}
but i am getting this error :
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
You can specify a valid test database connection, username, and password in the phpunit.xml. Do not test against your development database.
Please or to participate in this conversation.