tests/TestCase.php
/**
     * Be an admin user, give gate permissions to user.
     */
Be an admin user, give gate permissions to user.
Be an admin user give gate permissions to user .
protected function beAdminUser(): self
    {
        $user = new User();
        $user->id = 1;
        $this->be($user);
        $this->allowAdminGate();
        return $this;
    }
protected function beAdminUser ( ) : self { $ user = new User ( ) ; $ user -> id = 1 ; $ this -> be ( $ user ) ; $ this -> allowAdminGate ( ) ; return $ this ; }
Be an admin user, give gate permissions to user.
Be an admin user give gate permissions to user .