Example #1
0
 public function test_QueueTest__pullMessagePullPriority()
 {
     $this->object = new Client($this->store);
     $message1 = $this->object->addMessage('3', Message::HIGH);
     $message2 = $this->object->addMessage('1', Message::NORM);
     $message2 = $this->object->addMessage('2', Message::LOW);
     $body = $this->object->pullMessage(Message::NORM);
     $this->assertEquals(1, $body);
     $body = $this->object->pullMessage(Message::LOW);
     $this->assertEquals(2, $body);
     $this->assertNull($this->object->pullMessage(Message::LOW));
     $body = $this->object->pullMessage(Message::HIGH);
     $this->assertEquals(3, $body);
 }