You are here

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

File

./restrict_by_ip.test, line 398

Class

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

Code

public function testAdminUserValidation() {
  $user = $this
    ->drupalCreateUser();
  $form = array();
  $form['restriction'] = 'not_an_ip';
  $this
    ->drupalPost('admin/config/people/restrict_by_ip/login/edit/' . $user->uid, $form, t('Save restriction'));
  $this
    ->assertText('IP Address in Incorrect Format.');
}