public function UiTest::testUserRegisterValidation in Restrict Login or Role Access by IP Address 8.4
File
- src/
Tests/ UiTest.php, line 23
Class
- UiTest
- Test admin interfaces.
Namespace
Drupal\restrict_by_ip\TestsCode
public function testUserRegisterValidation() {
$form = [];
$form['name'] = $this
->randomMachineName(8);
$form['mail'] = $this
->randomMachineName(5) . '@domain.notatld';
$pass = $this
->randomMachineName(5);
$form['pass[pass1]'] = $pass;
$form['pass[pass2]'] = $pass;
$form['restrict_by_ip_address'] = 'not_an_ip';
$this
->drupalPostForm('admin/people/create', $form, t('Create new account'));
$this
->assertText('IP address must be in CIDR notation.');
}