You are here

function MonitoringUITest::testSensorSettingsUI in Monitoring 7

Test the sensor settings UI.

File

test/tests/monitoring.ui.test, line 32
Contains \MonitoringUITest.

Class

MonitoringUITest
Tests for the Monitoring UI.

Code

function testSensorSettingsUI() {
  $account = $this
    ->drupalCreateUser(array(
    'administer monitoring',
  ));
  $this
    ->drupalLogin($account);

  // The separate threshold settings tests have been split into separate
  // methods for better separation.
  $this
    ->checkExceedsThresholdSettings();
  $this
    ->checkFallsThresholdSettings();
  $this
    ->checkInnerThresholdSettings();
  $this
    ->checkOuterThresholdSettings();

  // Test that trying to access the sensors settings page of a non-existing
  // sensor results in a page not found response.
  $this
    ->drupalGet('admin/config/system/monitoring/sensors/non_existing_sensor');
  $this
    ->assertResponse(404);
}