Skip to content

Commit

Permalink
Commented out auth code grant test
Browse files Browse the repository at this point in the history
This test case is for refernce only. Testing it requires browser/server exchange which is not supported by TravisCI
  • Loading branch information
mmallis87 committed Jun 7, 2019
1 parent a8d0ec0 commit 9a4917c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/OAuthTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,24 @@ public function testAuthorizationCodeLogin()
# # that code and pass it to token endpoint as shown in the next
# # lines:
# #
$code = '';
$token = $this->config->getApiClient()->generateAccessToken($this->config->getIntegratorKey(), $this->config->getClientSecret(), $code);
# $code = '';
# $token = $this->config->getApiClient()->generateAccessToken($this->config->getIntegratorKey(), $this->config->getClientSecret(), $code);

$this->assertInstanceOf('DocuSign\eSign\Client\Auth\OAuthToken', $token[0]);
# $this->assertInstanceOf('DocuSign\eSign\Client\Auth\OAuthToken', $token[0]);

echo $token[0];
# echo $token[0];

$user = $this->config->getApiClient()->getUserInfo($token[0]['access_token']);
$this->assertInstanceOf('DocuSign\eSign\Client\Auth\UserInfo', $user[0]);
$this->assertSame(200, $user[1]);
# $user = $this->config->getApiClient()->getUserInfo($token[0]['access_token']);
# $this->assertInstanceOf('DocuSign\eSign\Client\Auth\UserInfo', $user[0]);
# $this->assertSame(200, $user[1]);

$loginAccount = $user[0]['accounts'][0];
if (isset($loginInformation)) {
$accountId = $loginAccount->getAccountId();
if (!empty($accountId)) {
$this->config->setAccountId($accountId);
}
}
# $loginAccount = $user[0]['accounts'][0];
# if (isset($loginInformation)) {
# $accountId = $loginAccount->getAccountId();
# if (!empty($accountId)) {
# $this->config->setAccountId($accountId);
# }
# }
}


Expand Down

0 comments on commit 9a4917c

Please sign in to comment.