/** * Ctor * * When $autoIncidentKey is true it auto-generates an `incident_key` based on $description. * The incident_key is an md5 hash of the $description. This prevents * PagerDuty from flooding admins with incidents that are essentially the same. * * @param string $serviceKey * @param string $description * @param bool $autoIncidentKey (Opt) - Default: false */ public function __construct($serviceKey, $description, $autoIncidentKey = false) { parent::__construct($serviceKey, 'trigger'); $this->setDescription($description); $this->autoIncidentKey = (bool) $autoIncidentKey; }
public function testResolveSendHit() { $evt = new Event(); $evt->setApiUrl('test'); $evt->setServiceKey('12345678901234567890123456789012'); $evt->setIncidentKey('ikey'); $evt->resolve(); }