Esempio n. 1
0
 /**
  * @param Payload $payload
  */
 public function processPayload(Payload $payload)
 {
     if (!($hook = $this->getHook($payload->getHookId()))) {
         return;
     }
     $this->getEventManager()->trigger(new Event($payload->getEvent(), $hook, array('payload' => $payload)));
 }
Esempio n. 2
0
 public function testGetters()
 {
     $this->assertEquals($this->payload->getContent(), array('dummy' => 1));
     $this->assertEquals($this->payload->getEvent(), HookManager::EVENT_PING);
     $this->assertEquals($this->payload->getHookId(), '_ID_');
 }