Ejemplo n.º 1
0
 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'));
 }
Ejemplo n.º 2
0
 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());
 }
Ejemplo n.º 3
0
 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());
 }