コード例 #1
0
 /**
  * Pushes all jobs in the provider to the queue at once
  *
  * @return Job[]
  */
 public function pushJobs()
 {
     $jobs = $this->jobProvider();
     foreach ($jobs as $job) {
         $job = reset($job);
         $this->connector->push('test', $job);
     }
     return $jobs;
 }
コード例 #2
0
ファイル: QueueTest.php プロジェクト: indigophp/queue
 /**
  * @covers ::delayed
  * @group  Queue
  * @group  Main
  */
 public function testDelayed()
 {
     $this->connector->shouldReceive('delayed')->andReturn(null);
     $job = \Mockery::mock('Indigo\\Queue\\Job');
     $this->assertNull($this->queue->delayed(0, $job));
 }
コード例 #3
0
ファイル: RestClient.php プロジェクト: pkoin/php-dilicom
 /**
  * Requests Dilicom
  *
  * @param  string $api      API Dilicom
  * @param  array  $options  Options to pass to the connector
  * @return mixed
  */
 protected function request($api, $options = array())
 {
     return $this->connector->get("/v1/hub-numerique-api/{$api}", null, array_merge(array("auth" => array($this->user, $this->password), "verify" => $this->should_verify_ssl, "debug" => $this->enable_debug), $options));
 }