public function UiTest::testRoleByIpSettingsValidation in Restrict Login or Role Access by IP Address 8.4
File
- src/
Tests/ UiTest.php, line 185
Class
- UiTest
- Test admin interfaces.
Namespace
Drupal\restrict_by_ip\TestsCode
public function testRoleByIpSettingsValidation() {
// Create a role to test.
$this
->drupalCreateRole([], 'test');
$form = [];
$form['restrict_by_ip_role_test'] = 'not_an_ip';
$this
->drupalPostForm('admin/config/people/restrict_by_ip/role', $form, t('Save configuration'));
$this
->assertText('IP address must be in CIDR notation.');
}