You are here

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

File

./restrict_by_ip.test, line 385

Class

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

Code

public function testUserEditSubmit() {
  $user = $this
    ->drupalCreateUser();
  $this
    ->drupalGet('user/' . $user->uid . '/edit');
  $this
    ->assertFieldByName('restrict_by_ip_address', '');
  $form = array();
  $form['restrict_by_ip_address'] = '127.0.0.1/32';
  $this
    ->drupalPost('user/' . $user->uid . '/edit', $form, t('Save'));
  $this
    ->assertText('The changes have been saved.');
  $this
    ->assertFieldByName('restrict_by_ip_address', $form['restrict_by_ip_address']);
}