You are here

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

Validates the auth link that gets created.

File

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

Class

OauthTest
Oauth test.

Namespace

Drupal\Tests\media_acquiadam\Unit

Code

public function testGetAuthLink() {
  $authUrl = $this->oAuthClient
    ->getAuthLink();
  $this
    ->assertStringContainsString('some/url/test', $authUrl);
  $this
    ->assertStringContainsString('testToken112233', $authUrl);
  $this
    ->assertStringContainsString('WDclient-id', $authUrl);
  $this
    ->assertStringContainsString('/oauth2/authorize', $authUrl);
}