You are here

public function RestrictByIpUITests::testUserRegisterValidation in Restrict Login or Role Access by IP Address 7.3

File

./restrict_by_ip.test, line 341

Class

RestrictByIpUITests
Test admin interfaces. Assumes that local testing environment has IP address of 127.0.0.1.

Code

public function testUserRegisterValidation() {
  $form = array();
  $form['name'] = $this
    ->randomName(8);
  $form['mail'] = $this
    ->randomName(5) . '@domain.notatld';
  $pass = $this
    ->randomName(5);
  $form['pass[pass1]'] = $pass;
  $form['pass[pass2]'] = $pass;
  $form['restrict_by_ip_address'] = 'not_an_ip';
  $this
    ->drupalPost('admin/people/create', $form, t('Create new account'));
  $this
    ->assertText('IP Address in Incorrect Format.');
}