You are here

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

Validates that the redirect URL gets generated correctly.

File

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

Class

OauthTest
Oauth test.

Namespace

Drupal\Tests\media_acquiadam\Unit

Code

public function testGetSetAuthFinishRedirect() {
  $this
    ->assertNull($this->oAuthClient
    ->getAuthFinishRedirect());
  $this->oAuthClient
    ->setAuthFinishRedirect('https://example.com/sub/path?original_path=should-be-dropped&extra=1');
  $this
    ->assertSame('https://example.com/sub/path?extra=1', $this->oAuthClient
    ->getAuthFinishRedirect());
}