tests/Feature/Admin/ManagePostsControllerTest.php
/**
     * Assert that the index admin page is not accessible for guests.
     * (Via auth middleware).
     */
Assert that the index admin page is not accessible for guests.
(Via auth middleware).
Assert that the index admin page is not accessible for guests . ( Via auth middleware ) .
public function testForbiddenToGuests(): void
    {
        $response = $this->get(route('blogetc.admin.index'));
        $response->assertRedirect(route('login'));
    }
public function testForbiddenToGuests ( ) : void { $ response = $ this -> get ( route ( 'blogetc.admin.index' ) ) ; $ response -> assertRedirect ( route ( 'login' ) ) ; }
Assert that the index admin page is not accessible for guests.
Assert that the index admin page is not accessible for guests .