public function testSiteUrlArePropertlyBuiltFromDefaultPaths() { $config = new StandardConfig(array('siteUrl' => 'https://example.com/oauth/')); $this->assertEquals('https://example.com/oauth/authorize', $config->getAuthorizeUrl()); $this->assertEquals('https://example.com/oauth/request_token', $config->getRequestTokenUrl()); $this->assertEquals('https://example.com/oauth/access_token', $config->getAccessTokenUrl()); }
/** * Constructor; creates a new HTTP Client instance which itself is * just a typical Zend_HTTP_Client subclass with some OAuth icing to * assist in automating OAuth parameter generation, addition and * cryptographic signing of requests. * * @param array|Traversable $oauthOptions * @param string $uri * @param array|Traversable $options */ public function __construct($oauthOptions, $uri = null, $config = null) { parent::__construct($uri, $config); $this->_config = new Config\StandardConfig(); if ($oauthOptions !== null) { if ($oauthOptions instanceof Traversable) { $oauthOptions = ArrayUtils::iteratorToArray($oauthOptions); } $this->_config->setOptions($oauthOptions); } }