tests/Feature/Auth/LogoutControllerTest.php
/**
     * A basic feature test example.
     *
     * @return void
     */
A basic feature test example.
@return void
A basic feature test example . @return void
public function testLogout()
    {
        $user = User::factory()->create();
        $response = $this->actingAs($user)->post(route("logout"));
        $response->assertStatus(302);
        $response->assertRedirect(route("login"));
    }
public function testLogout ( ) { $ user = User :: factory ( ) -> create ( ) ; $ response = $ this -> actingAs ( $ user ) -> post ( route ( " logout " ) ) ; $ response -> assertStatus ( 302 ) ; $ response -> assertRedirect ( route ( " login " ) ) ; }
A basic feature test example.
A basic feature test example .