/** * @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))); }
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_'); }