public function testMessage() { $channel = 'foo'; $payload = 'bar'; $message = new Message($channel, $payload); $this->assertEquals($message, Message::fromJson($message->toJson())); $this->assertEquals($channel, $message->getChannel()); $this->assertEquals($payload, $message->getPayload()); }
public function onBlock($block) { $message = Message::fromJson($block); $this->queueContext->enqueue($message); }