function LegalRegister::testRegisterSuccessful in Legal 6.7
* Accept T&C to successfully create an account
File
- tests/
register.test, line 27
Class
- LegalRegister
- Register as new user and create account.
Code
function testRegisterSuccessful() {
/* Prepare a user to do testing */
$name = $this
->randomName();
$mail = "{$name}@example.com";
$edit = array(
'name' => $name,
'mail' => $mail,
'legal_accept' => 1,
);
$this
->drupalPost('user/register', $edit, 'Create new account');
/* Check account was created */
$this
->assertText(t('Your password and further instructions have been sent to your e-mail address'), ' [post] Account created');
}