get('/forgot-password'); $response->assertStatus(200); } public function test_password_reset_link_can_be_requested(): void { Notification::fake(); $user = User::factory()->create(); $this->post('/forgot-password', ['email' => $user->email]); Notification::assertSentTo($user, ResetPassword::class); } public function test_password_reset_link_fails_with_invalid_email(): void { $response = $this->post('/forgot-password', [ 'email' => 'nonexistent@example.com', ]); $response->assertSessionHasErrors('email'); } public function test_password_reset_link_validates_email(): void { $response = $this->post('/forgot-password', [ 'email' => '', ]); $response->assertSessionHasErrors('email'); } }