You are here

public function MonitoringUITest::testSettingsUI in Monitoring 8

Test the monitoring settings UI.

File

tests/src/Functional/MonitoringUITest.php, line 32

Class

MonitoringUITest
Tests for the Monitoring UI.

Namespace

Drupal\Tests\monitoring\Functional

Code

public function testSettingsUI() {

  // Create a test user and log in.
  $account = $this
    ->drupalCreateUser(array(
    'access administration pages',
    'administer monitoring',
  ));
  $this
    ->drupalLogin($account);

  // Check the form.
  $this
    ->drupalGet('admin/config/system');
  $this
    ->assertText(t('Configure enabled monitoring products.'));
  $this
    ->clickLink(t('Monitoring settings'));
  $this
    ->assertField('sensor_call_logging');
  $this
    ->assertOptionSelected('edit-sensor-call-logging', 'on_request');
  $this
    ->assertText(t('Control local logging of sensor call results.'));
}