protected function SimplenewsMonitoringTest::runSensor in Simplenews 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/SimplenewsMonitoringTest.php \Drupal\Tests\simplenews\Kernel\SimplenewsMonitoringTest::runSensor()
- 3.x tests/src/Kernel/SimplenewsMonitoringTest.php \Drupal\Tests\simplenews\Kernel\SimplenewsMonitoringTest::runSensor()
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.
1 call to SimplenewsMonitoringTest::runSensor()
- SimplenewsMonitoringTest::testSensors in tests/
src/ Kernel/ SimplenewsMonitoringTest.php - Tests individual sensors.
File
- tests/
src/ Kernel/ SimplenewsMonitoringTest.php, line 66 - Simplenews monitoring test functions.
Class
- SimplenewsMonitoringTest
- Tests for simplenews sensor.
Namespace
Drupal\Tests\simplenews\KernelCode
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);
}