public function testRelaysMethodsToInternalOAuthInstance() { $oauth = $this->getMock('Zend_Oauth_Consumer', array(), array(), '', false); $oauth->expects($this->once())->method('getRequestToken')->will($this->returnValue('foo')); $oauth->expects($this->once())->method('getRedirectUrl')->will($this->returnValue('foo')); $oauth->expects($this->once())->method('redirect')->will($this->returnValue('foo')); $oauth->expects($this->once())->method('getAccessToken')->will($this->returnValue('foo')); $oauth->expects($this->once())->method('getToken')->will($this->returnValue('foo')); $twitter = new Zend_Service_Twitter(array('opt1' => 'val1'), $oauth); $this->assertEquals('foo', $twitter->getRequestToken()); $this->assertEquals('foo', $twitter->getRedirectUrl()); $this->assertEquals('foo', $twitter->redirect()); $this->assertEquals('foo', $twitter->getAccessToken(array(), $this->getMock('Zend_Oauth_Token_Request'))); $this->assertEquals('foo', $twitter->getToken()); }