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']); }
public function produceError() { $this->checkForError(TestCase::getResource('Gearman/Error')); }