public function testRelaysMethodsToInternalOAuthInstance() { $oauth = $this->getMock('ZendOAuth\\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 Twitter\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('ZendOAuth\\Token\\Request'))); $this->assertEquals('foo', $twitter->getToken()); }