Exemplo n.º 1
0
 /**
  * @covers SimplyDO\OAuthResponse::setResponse
  * @covers SimplyDO\OAuthResponse::getResponse
  */
 public function testShouldSetAndGetArrayResponse()
 {
     $this->model->setResponse(json_encode(['key' => 'value']));
     $response = $this->model->getResponse();
     $this->assertTrue(is_array($response));
     $this->assertArrayHasKey('key', $response);
 }
Exemplo n.º 2
0
 /**
  * @param OAuthResponse $response
  * @return array
  */
 public function handleError(OAuthResponse $response)
 {
     return ['error' => $response->getCode(), 'error_message' => $response->getError(), 'raw_response' => $response->getResponse()];
 }