/** @test */ public function it_logout_user() { $this->login(); $this->visit(user_homepage())->submitForm('#logout-form', ['_token' => csrf_token()])->seePageIs(guest_homepage()); $this->assertFalse(Auth::check()); }
/** * @param Authenticator $authenticator * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ public function postLogout(Authenticator $authenticator) { $authenticator->logout(); return redirect(guest_homepage()); }