tests/Feature/Frontend/UserRegistrationTest.php
/**
     * Helper function for registering a user.
     * @param array $userData
     * @return TestResponse
     */
Helper function for registering a user.
@param array $userData
@return TestResponse
Helper function for registering a user . @param array $userData @return TestResponse
protected function registerUser($userData = [])
    {
        factory(Role::class)->create(['name' => config('access.users.default_role')]);
        return $this->post('/register', array_merge([
            'first_name' => 'John',
            'last_name' => 'Doe',
            'username' => 'johndoe',
            'email' => 'john@example.com',
            'password' => 'OC4Nzu270N!QBVi%U%qX',
            'password_confirmation' => 'OC4Nzu270N!QBVi%U%qX',
        ], $userData));
    }
protected function registerUser ( $ userData = [ ] ) { factory ( Role :: class ) -> create ( [ 'name' => config ( 'access.users.default_role' ) ] ) ; return $ this -> post ( '/register' , array_merge ( [ 'first_name' => 'John' , 'last_name' => 'Doe' , 'username' => 'johndoe' , 'email' => 'john@example.com' , 'password' => 'OC4Nzu270N!QBVi%U%qX' , 'password_confirmation' => 'OC4Nzu270N!QBVi%U%qX' , ] , $ userData ) ) ; }
Helper function for registering a user.
Helper function for registering a user .