Beispiel #1
0
 /**
  * @test
  */
 public function purgeShouldResultInAnEmptyQueue()
 {
     $this->adapter->purge();
     for ($x = 10; $x <= 10; $x++) {
         $this->adapter->enqueue("message {$x}", 'tenhunen');
     }
     list($msg, $identifier, $internals) = $this->adapter->dequeue();
     $this->assertInternalType('string', $msg);
     $this->adapter->ack($identifier, $internals);
     $this->adapter->purge();
     $this->assertFalse($this->adapter->dequeue());
 }
Beispiel #2
0
 /**
  * Acknowledges message
  *
  * @param Message $message
  */
 public function ack(Message $message)
 {
     return $this->adapter->ack($message->getIdentifier(), $message->getInternals());
 }