Example #1
0
 public function testProcessWrongCallback()
 {
     return;
     $client = new Client();
     $channel = new RequestChannel($client);
     $channel->setCallback(function ($request) {
         throw new \Exception("Error Processing Request", 1);
     });
     $job = new GearmanJob();
     $job->setWorkload(TestCase::getResource('Request/GET'));
     $json = $channel->process($job);
     $data = json_decode($json, true);
     $this->assertSame('Error: Error Processing Request', $data['body']);
     $this->assertSame(500, $data['responseCode']);
 }
Example #2
0
 public function produceError()
 {
     $this->checkForError(TestCase::getResource('Gearman/Error'));
 }