protected function MonitoringTestTrait::runSensor in Monitoring 8
Executes a sensor and returns the result.
Parameters
string $sensor_name: Name of the sensor to execute.
Return value
\Drupal\monitoring\Result\SensorResultInterface The sensor result.
15 calls to MonitoringTestTrait::runSensor()
- MonitoringCommerceTest::testTurnoverSensor in tests/
src/ Functional/ MonitoringCommerceTest.php - Tests the commerce turnover sensor.
- MonitoringCoreWebTest::doTestDatabaseAggregatorSensorPluginActiveSessions in tests/
src/ Functional/ MonitoringCoreWebTest.php - Tests active session count through db aggregator sensor.
- MonitoringCoreWebTest::doTestTwigDebugSensor in tests/
src/ Functional/ MonitoringCoreWebTest.php - Tests the twig debug sensor.
- MonitoringCoreWebTest::doTestUserIntegritySensorPlugin in tests/
src/ Functional/ MonitoringCoreWebTest.php - Tests the user integrity sensor.
- MonitoringCoreWebTest::testEntityAggregator in tests/
src/ Functional/ MonitoringCoreWebTest.php - Tests the entity aggregator.
File
- tests/
src/ Functional/ MonitoringTestTrait.php, line 21
Class
- MonitoringTestTrait
- Monitoring test helper trait.
Namespace
Drupal\Tests\monitoring\FunctionalCode
protected function runSensor($sensor_name) {
// Make sure the sensor is enabled.
monitoring_sensor_manager()
->enableSensor($sensor_name);
return monitoring_sensor_run($sensor_name, TRUE, TRUE);
}