You are here

public function MonitoringCoreKernelTest::testConfigValueSensorPluginDefaultTheme in Monitoring 8

Tests the default theme sensor.

See also

\Drupal\monitoring\Plugin\monitoring\SensorPlugin\ConfigValueSensorPlugin

File

tests/src/Kernel/MonitoringCoreKernelTest.php, line 711

Class

MonitoringCoreKernelTest
Kernel tests for the core pieces of monitoring.

Namespace

Drupal\Tests\monitoring\Kernel

Code

public function testConfigValueSensorPluginDefaultTheme() {
  $this
    ->config('system.theme')
    ->set('default', 'bartik')
    ->save();
  $result = $this
    ->runSensor('core_theme_default');
  $this
    ->assertTrue($result
    ->isOk());
  $this
    ->assertEqual($result
    ->getMessage(), 'Value bartik');
  $this
    ->config('system.theme')
    ->set('default', 'garland')
    ->save();
  $result = $this
    ->runSensor('core_theme_default');
  $this
    ->assertTrue($result
    ->isCritical());
}