Ejemplo n.º 1
0
 public function testEffectiveUrl()
 {
     $this->assertSame($this->effectiveUrl, $this->httpResponse->getEffectiveUrl());
 }
Ejemplo n.º 2
0
 public function testIsValidWithInvalidResponse()
 {
     $this->httpResponse->expects($this->any())->method('getBody')->will($this->returnValue('{"errors":"foo"}'));
     $this->oauthResponse = new OAuthResponse($this->httpResponse);
     $this->assertFalse($this->oauthResponse->isValid());
 }
Ejemplo n.º 3
0
 /**
  * Gets the rate limit reset.
  *
  * @return string The rate limit reset.
  */
 public function getRateLimitReset()
 {
     return $this->httpResponse->getHeader('X-Rate-Limit-Reset');
 }
Ejemplo n.º 4
0
 /**
  * Parses & normalizes the Time Zone API response
  *
  * @param $response
  * @return array
  */
 protected function parse(HttpResponse $response)
 {
     return json_decode($response->getBody(), true);
 }