runworker() public method

Runs a Queue Worker process which will try to find unassigned jobs in the queue which it may run and try to fetch and execute them.
public runworker ( ) : void
return void
 /**
  * QueueShellTest::testRetry()
  *
  * @return void
  */
 public function testRetry()
 {
     $this->QueueShell->args[] = 'RetryExample';
     $result = $this->QueueShell->add();
     $this->assertEmpty($this->QueueShell->out);
     $result = $this->QueueShell->runworker();
     //debug($this->QueueShell->out);
     $this->assertTrue(in_array('Job did not finish, requeued.', $this->QueueShell->out));
 }
 /**
  * QueueShellTest::testRetry()
  *
  * @return void
  */
 public function testRetry()
 {
     $this->QueueShell->args[] = 'RetryExample';
     $this->QueueShell->add();
     $expected = 'This is a very simple example of a QueueTask and how retries work';
     $this->assertContains($expected, $this->out->output());
     $this->QueueShell->runworker();
     $this->assertContains('Job did not finish, requeued.', $this->out->output());
 }