I want to write a functional test that takes some test user credentials in a remote system, and posts them to Drupal login.
So far, I have
/**
* These users should authetnicate via Netforum.
*/
public function testNetforumUsersCanAuthenticate() {
$this->drupalGet('user/login');
$edit = ['name' => [redacted], 'pass' => [redacted]];
$this->drupalPostForm(NULL, $edit, t('Log in'));
}
The authentication always goes through the external system even if the local account exists in Drupal. Therefore, I cannot just create these accounts beforehand.
The account should get created when authentication passes - and then I want to look at the users roles to check if they match what I expect for the different test accounts.
What can I use to see that this was successful and then look at the roles and check them?