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