Esempio n. 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());
 }
Esempio n. 2
0
 /**
  * Purges the queue
  */
 public function purge()
 {
     return $this->adapter->purge();
 }