public function __construct($accountName, $accountKey, $grantType, $scope, $oauthService) { parent::__construct($accountName, $accountKey, $grantType, $scope, $oauthService); }
/** * @covers WindowsAzure\Common\Internal\Authentication\OAuthScheme::getAuthorizationHeader */ public function testGetAuthorizationHeaderMultiple() { $this->skipIfEmulated(); // Setup // OAuth REST setup $channel = new HttpClient(); $uri = Resources::MEDIA_SERVICES_OAUTH_URL; $connection = TestResources::getMediaServicesConnectionParameters(); $settings = new MediaServicesSettings($connection['accountName'], $connection['accessKey']); $scope = Resources::MEDIA_SERVICES_OAUTH_SCOPE; $grantType = Resources::OAUTH_GT_CLIENT_CREDENTIALS; $rest = new OAuthRestProxy($channel, $uri); // Scheme setup $headers = array(); $url = Resources::MEDIA_SERVICES_URL; $queryParams = array(); $httpMethod = Resources::HTTP_GET; // Get access token $scheme = new OAuthScheme($settings->getAccountName(), $settings->getAccessKey(), $grantType, $scope, $rest); $token = $scheme->getAuthorizationHeader($headers, $url, $queryParams, $httpMethod); // Test $actual = $scheme->getAuthorizationHeader($headers, $url, $queryParams, $httpMethod); // Assert $this->assertEquals($token, $actual); }