You are here

public function OauthTest::testGetAccessToken in Media: Acquia DAM 8

Validates that the access token response has the necessary keys.

File

tests/src/Unit/OauthTest.php, line 66

Class

OauthTest
Oauth test.

Namespace

Drupal\Tests\media_acquiadam\Unit

Code

public function testGetAccessToken() {
  $token = $this->oAuthClient
    ->getAccessToken('somedummycode123');
  $this
    ->assertArrayHasKey('expire_time', $token);
  $this
    ->assertArrayHasKey('access_token', $token);
  $this
    ->assertNotEmpty($token['access_token']);
}