onMessageReceived() публичный Метод

If an earlier listener has erred or stopped propagation, this method will not fire and the Queued Message should become visible in queue again. Stops Event Propagation after removing the Message
public onMessageReceived ( Uecode\Bundle\QPushBundle\Event\MessageEvent $event ) : boolean | void
$event Uecode\Bundle\QPushBundle\Event\MessageEvent The SQS Message Event
Результат boolean | void
Пример #1
0
 public function testOnMessageReceived()
 {
     $this->provider->create();
     $id = $this->provider->publish(['foo' => 'bar']);
     $path = substr(hash('md5', $id), 0, 3);
     $this->assertTrue(is_file($this->basePath . DIRECTORY_SEPARATOR . $this->queueHash . DIRECTORY_SEPARATOR . $path . DIRECTORY_SEPARATOR . $id . '.json'));
     $this->provider->onMessageReceived(new MessageEvent('test', $this->provider->receive()[0]));
     $this->assertFalse(is_file($this->basePath . DIRECTORY_SEPARATOR . $this->queueHash . DIRECTORY_SEPARATOR . $path . DIRECTORY_SEPARATOR . $id . '.json'));
 }