Ejemplo n.º 1
0
 public function testWorkerFailsUncompletedJobsOnExit()
 {
     $worker = new Worker('jobs');
     $worker->registerWorker();
     $payload = array('class' => 'Test_Job');
     $job = new Job('jobs', $payload);
     $worker->workingOn($job);
     $worker->unregisterWorker();
     $this->assertEquals(1, Stat::get('failed'));
 }