/** * @covers OAuth\OAuth1\Service\Yahoo::request */ public function testRequest() { $client = $this->getMock('\\OAuth\\Common\\Http\\Client\\ClientInterface'); $client->expects($this->once())->method('retrieveResponse')->will($this->returnValue('response!')); $token = $this->getMock('\\OAuth\\OAuth1\\Token\\TokenInterface'); $storage = $this->getMock('\\OAuth\\Common\\Storage\\TokenStorageInterface'); $storage->expects($this->any())->method('retrieveAccessToken')->will($this->returnValue($token)); $service = new Yahoo($this->getMock('\\OAuth\\Common\\Consumer\\CredentialsInterface'), $client, $storage, $this->getMock('\\OAuth\\OAuth1\\Signature\\SignatureInterface'), $this->getMock('\\OAuth\\Common\\Http\\Uri\\UriInterface')); $this->assertSame('response!', $service->request('/my/awesome/path')); }