public function Redis_Tests_Queue_QueueUnitTestCase::testRelease in Redis 7.3
File
- lib/
Redis/ Tests/ Queue/ QueueUnitTestCase.php, line 63
Class
- Redis_Tests_Queue_QueueUnitTestCase
- Some tests in there credits goes to the redis_queue module. Thanks to their author.
Code
public function testRelease() {
$data = 'test-queue-item';
$res = $this->queue
->createItem($data);
$item = $this->queue
->claimItem();
$num = $this->queue
->numberOfItems();
$this
->assertEqual(0, $num);
$res = $this->queue
->releaseItem($item);
$num = $this->queue
->numberOfItems();
$this
->assertEqual(1, $num);
}