示例#1
0
 /**
  * @return Job|null
  */
 public function invoke()
 {
     try {
         return $this->jobFactory->createFromResponse($this->responseOath->invoke());
     } catch (NotFoundException $notFound) {
         return null;
     }
 }
示例#2
0
 /**
  * @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);
 }