/** * Test that we can get an unreserved task * * @return void * * @test */ public function testGetUnreservedTask() { //generate a random value to verify $_testValue = mt_rand(); //create a task and check it's instantiated $_task = $this->_getTask($_testValue); //add task to queue $this->_adapter->addTask($this->_queue, $_task); //peek at queue task $_task2 = $this->_adapter->getUnreservedTask($this->_queue); //get the info on the task and check that it's still queued $this->assertEquals(Lilmuckers_Queue_Model_Queue_Task_State::QUEUED, $_task2->getInfo(true)->getState(), 'Check that the task was requeued'); //delete the task that was set $this->_adapter->remove($this->_queue, $_task2); }