/** * @return Job|null */ public function invoke() { try { return $this->jobFactory->createFromResponse($this->responseOath->invoke()); } catch (NotFoundException $notFound) { return null; } }
/** * @expectedException \Beanie\Exception\InvalidArgumentException */ public function testCreate_noJobData_throwsInvalidArgumentException() { $response = new Response(Response::RESPONSE_OK, ['id' => self::TEST_ID], $this->getServerMock()); $JobFactory = new JobFactory(); $JobFactory->createFromResponse($response); }