示例#1
0
 /**
  * @expectedException \Widop\Twitter\OAuth\OAuthException
  * @expectedExceptionMessage An error occured when creating the OAuth token.
  */
 public function testGetRequestTokenError()
 {
     $response = $this->getMockBuilder('Widop\\HttpAdapter\\HttpResponse')->disableOriginalConstructor()->getMock();
     $response->expects($this->once())->method('getBody')->will($this->returnValue('foo'));
     $this->httpAdapter->expects($this->once())->method('postContent')->will($this->returnValue($response));
     $this->oauth->getRequestToken();
 }