public function LoginSecurityInterfaceTest::testAdminUserSettings in Login Security 2.x
Test admin user settings.
File
- tests/
src/ Functional/ LoginSecurityInterfaceTest.php, line 32
Class
- LoginSecurityInterfaceTest
- Test Login Security's web interface.
Namespace
Drupal\Tests\login_security\FunctionalCode
public function testAdminUserSettings() {
$settings_fields = $this
->getAdminUserSettingsFields();
$this
->drupalGet(parent::ADMIN_SETTINGS_PATH);
$this
->assertResponse(200, 'Access granted to settings page.');
// Assert Fields.
foreach ($settings_fields as $field_name) {
$this
->assertField($field_name, new FormattableMarkup('@field_name field exists.', [
'@field_name' => $field_name,
]));
}
}