How do I simulate a registration form submission while testing?

I just discovered the “register_new_user” function so there does not appear to be a need for simulating the registration form. So I can do something like this:

    public function test_registration_errors {                                                                                                            
       $user_login = 'newuser';
       $user_email="[email protected]";               
       $errors = register_new_user ( $user_login, $user_email
       $this->assertIsNotInt( $errors );
    }