public function UiTest::testUserEditSubmit in Restrict Login or Role Access by IP Address 8.4
File
- src/
Tests/ UiTest.php, line 67  
Class
- UiTest
 - Test admin interfaces.
 
Namespace
Drupal\restrict_by_ip\TestsCode
public function testUserEditSubmit() {
  $user = $this
    ->drupalCreateUser();
  $this
    ->drupalGet('user/' . $user
    ->id() . '/edit');
  $this
    ->assertFieldByName('restrict_by_ip_address', '');
  $form = [];
  $form['restrict_by_ip_address'] = $this->currentIPCIDR;
  $this
    ->drupalPostForm('user/' . $user
    ->id() . '/edit', $form, t('Save'));
  $this
    ->assertText('The changes have been saved.');
  $this
    ->assertFieldByName('restrict_by_ip_address', $form['restrict_by_ip_address']);
}