function LegalRegisterTestCase::testRegisterUnsuccessful in Legal 6.8
Same name and namespace in other branches
- 7.2 legal.test \LegalRegisterTestCase::testRegisterUnsuccessful()
- 7 legal.test \LegalRegisterTestCase::testRegisterUnsuccessful()
Don't accept T&C no account created.
File
- ./
legal.test, line 85 - Tests for Legal module.
Class
- LegalRegisterTestCase
- Test registering as new user and creating an account.
Code
function testRegisterUnsuccessful() {
// Prepare a user to do testing.
$name = $this
->randomName();
$mail = "{$name}@example.com";
$edit = array(
'name' => $name,
'mail' => $mail,
);
$this
->drupalPost('user/register', $edit, t('Create new account'));
// Check account wasn't created.
$this
->assertText(t('Accept Terms & Conditions of Use field is required.'), 'T&C not accepted, account not created');
}