コード例 #1
0
ファイル: Validator.php プロジェクト: lightster/hodor
 /**
  * @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.");
 }
コード例 #2
0
ファイル: WorkerConfigTest.php プロジェクト: lightster/hodor
 /**
  * @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'));
 }