/** * @param string $name */ public function __construct($name) { parent::__construct(sprintf('Invalid sensor %s, should be one of %s', $name, implode(', ', array_keys(Sensors::getSensors())))); }
/** * @throws InvalidSensorException */ public function testSensorNotFoundException() { self::setExpectedException(InvalidSensorException::class); Sensors::getSensor('WindowsWOW', 1); }
/** * @param $name * @param $groupId * @return array * @throws InvalidSensorException */ protected function getSensor($name, $groupId) { return Sensors::getSensor($name, $groupId); }
/** * @throws \CBApi\Sensors\Exception\InvalidSensorException */ public function testSensorFound() { self::assertTrue(is_string(Sensors::getSensor('WindowsEXE', 1))); }