public function DomainRegistrationTest::testAllowWildcardMatch in Restrict Domain Registration 7
File
- ./
domain_registration.test, line 52 - Tests for the Domain Registration Module
Class
- DomainRegistrationTest
- @file Tests for the Domain Registration Module
Code
public function testAllowWildcardMatch() {
variable_set('domain_registration_method', DOMAIN_REGISTRATION_ALLOW);
variable_set('domain_registration', '*.example.com');
// Get the user data for registration.
$edit = array(
'name' => $this
->randomName(),
'mail' => $this
->randomName() . '@subdomain.example.com',
);
// Attempt to register a user with a whitelist email.
$this
->drupalPost('user/register', $edit, t('Create new account'));
$this
->assertText(t('A welcome message'), t('User registered successfully.'));
}