You are here

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

File

./restrict_by_ip.test, line 407

Class

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

Code

public function testAdminUserSubmit() {
  $user = $this
    ->drupalCreateUser();
  $form = array();
  $form['restriction'] = '127.0.0.1/32';
  $this
    ->drupalPost('admin/config/people/restrict_by_ip/login/edit/' . $user->uid, $form, t('Save restriction'));
  $this
    ->assertText('User restriction has been saved.');
  $this
    ->drupalGet('admin/config/people/restrict_by_ip/login/edit/' . $user->uid);
  $this
    ->assertFieldByName('restriction', $form['restriction']);
}