public function testDeregisterWithQueuedJobs() { return $this->markTestIncomplete(); $this->queue->push(new Job('Foo')); $this->queue->push(new Job('Foo')); $this->assertEquals(2, $this->queue->count()); $this->assertEquals(2, $this->registry->deregister($this->queue)); $this->assertEquals(0, $this->queue->count()); $this->assertFalse($this->redis->exists('queue:jobs')); }
public function testJobRemoval() { return $this->markTestIncomplete(); $job = new Job('JobToBeRemoved'); $this->queue->push($job); $this->queue->push(new Job('JobToStay')); $this->assertEquals(2, $this->queue->count()); $this->queue->remove(array('id' => $job->getId())); $this->assertEquals(1, $this->queue->count()); $this->queue->remove(); $this->assertEquals(1, $this->queue->count()); }
public function testPausedWorkerDoesNotPickUpJobs() { return $this->markTestIncomplete(); $queue = new RedisQueue($this->redis); $queue->setName('jobs'); $queue->push(new Job('Resque\\Component\\Job\\Tests\\Jobs\\Simple')); $this->worker->pause(); $this->worker->work(0); $this->assertEquals(1, $queue->count()); }