/**
  * Setup Defaults
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->QueueShell = new TestQueueShell();
     $this->QueueShell->initialize();
     $this->QueueShell->loadTasks();
     Configure::write('Queue', ['sleeptime' => 2, 'gcprob' => 10, 'defaultworkertimeout' => 3, 'defaultworkerretries' => 1, 'workermaxruntime' => 5, 'cleanuptimeout' => 10, 'exitwhennothingtodo' => false, 'pidfilepath' => TMP . 'queue' . DS, 'log' => false]);
 }
Ejemplo n.º 2
0
 /**
  * Setup Defaults
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->out = new ConsoleOutput();
     $this->err = new ConsoleOutput();
     $io = new ConsoleIo($this->out, $this->err);
     $this->QueueShell = $this->getMockBuilder(QueueShell::class)->setMethods(['in', 'err', '_stop'])->setConstructorArgs([$io])->getMock();
     $this->QueueShell->initialize();
     $this->QueueShell->loadTasks();
     Configure::write('Queue', ['sleeptime' => 2, 'gcprob' => 10, 'defaultworkertimeout' => 3, 'defaultworkerretries' => 1, 'workermaxruntime' => 5, 'cleanuptimeout' => 10, 'exitwhennothingtodo' => false, 'pidfilepath' => TMP . 'queue' . DS, 'log' => false]);
 }