Esempio n. 1
0
 /**
  * @param array $options
  * @throws Exception
  */
 private function validateQueueName(array $options)
 {
     if ($this->worker_config->hasWorkerConfig("worker", $options['queue_name'])) {
         return;
     }
     throw new Exception("Worker named '{$options['queue_name']}' not found.");
 }
Esempio n. 2
0
 /**
  * @covers ::__construct
  * @covers ::hasWorkerConfig
  * @covers ::<private>
  * @expectedException Exception
  */
 public function testCheckingExistenceOfWorkerOfUnknownTypeThrowsAnException()
 {
     $worker_config = new WorkerConfig($this->queue_config);
     $this->assertTrue($worker_config->hasWorkerConfig('destructive', 'job-worker'));
 }