public function testQueueIteratorInterface()
{
$values = array('RC', 'Dog', 'Cat', 'Carrot Cake');
foreach ($values as $value) {
$message = new Message();
$message->setText($value);
$this->queue->add($message);
}
foreach ($this->queue as $value) {
$this->assertTrue(in_array($value->getMessage(), $values));
}
foreach ($this->queue as $key => $value) {
$this->assertTrue(is_integer($key));
$this->assertEquals($value->getMessage(), $values[$key]);
}
}