function TestSensor::__construct in Monitoring 7
Instantiates a sensor object.
Parameters
SensorInfo $info: Sensor info object.
Overrides Sensor::__construct
File
- test/
lib/ Drupal/ monitoring_test/ Sensor/ Sensors/ TestSensor.php, line 21 - Contains \Drupal\monitoring_test\Sensor\Sensors\TestSensor.
Class
- TestSensor
- Test sensor to report status as provided by external arguments.
Namespace
Drupal\monitoring_test\Sensor\SensorsCode
function __construct(SensorInfo $info) {
parent::__construct($info);
// Load test sensor data which will be used in the runSensor() logic.
$this->testSensorResultData = variable_get('test_sensor_result_data', array(
'sensor_status' => NULL,
'sensor_message' => NULL,
'sensor_value' => NULL,
'sensor_expected_value' => NULL,
'sensor_exception_message' => NULL,
));
}