You are here

public function UiTest::testLoginByIpSettingsSubmit in Restrict Login or Role Access by IP Address 8.4

File

src/Tests/UiTest.php, line 174

Class

UiTest
Test admin interfaces.

Namespace

Drupal\restrict_by_ip\Tests

Code

public function testLoginByIpSettingsSubmit() {
  $form = [];
  $form['restrict_by_ip_error_page'] = $this
    ->randomMachineName(5);
  $form['restrict_by_ip_login_range'] = $this->currentIPCIDR;
  $this
    ->drupalPostForm('admin/config/people/restrict_by_ip/login', $form, t('Save configuration'));
  $this
    ->assertText('The configuration options have been saved.');
  $this
    ->assertFieldByName('restrict_by_ip_error_page', $form['restrict_by_ip_error_page']);
  $this
    ->assertFieldByName('restrict_by_ip_login_range', $form['restrict_by_ip_login_range']);
}