public function testResetsHttpClientOnReceiptOfAccessTokenToOauthClient() { $this->markTestIncomplete('Problem with resolving classes for mocking'); $oauth = $this->getMock('Zend\\OAuth\\Consumer', array(), array(), '', false); $client = $this->getMock('Zend\\OAuth\\Client', array(), array(), '', false); $token = $this->getMock('Zend\\OAuth\\Token\\Access', array(), array(), '', false); $token->expects($this->once())->method('getHttpClient')->will($this->returnValue($client)); $oauth->expects($this->once())->method('getAccessToken')->will($this->returnValue($token)); $client->expects($this->once())->method('setHeaders')->with('Accept-Charset', 'ISO-8859-1,utf-8'); $twitter = new Service\Twitter(array(), $oauth); $twitter->getAccessToken(array(), $this->getMock('Zend\\OAuth\\Token\\Request')); $this->assertTrue($client === $twitter->getLocalHttpClient()); }