public function UiTest::testAdminAddUserSubmit in Restrict Login or Role Access by IP Address 8.4
File
- src/
Tests/ UiTest.php, line 90
Class
- UiTest
- Test admin interfaces.
Namespace
Drupal\restrict_by_ip\TestsCode
public function testAdminAddUserSubmit() {
$user = $this
->drupalCreateUser();
$form = [];
$form['name'] = $user
->label() . ' (' . $user
->id() . ')';
$form['restriction'] = $this->currentIPCIDR;
$this
->drupalPostForm('admin/config/people/restrict_by_ip/login/user', $form, t('Save configuration'));
$this
->assertText('The configuration options have been saved.');
$this
->assertFieldByName('restrict_by_ip_user_' . $user
->id(), $form['restriction']);
}