You are here

public function UrlBuildersTest::testThatAuthorizeLinkIncludesState in Auth0 Single Sign On 8.2

File

vendor/auth0/auth0-php/tests/API/Authentication/UrlBuildersTest.php, line 43

Class

UrlBuildersTest

Namespace

Auth0\Tests\API\Authentication

Code

public function testThatAuthorizeLinkIncludesState() {
  $api = new Authentication('test-domain.auth0.com', '__test_client_id__');
  $authorize_url = $api
    ->get_authorize_link('code', 'https://example.com/cb', null, '__test_state__');
  $authorize_url_query = parse_url($authorize_url, PHP_URL_QUERY);
  $authorize_url_query = explode('&', $authorize_url_query);
  $this
    ->assertContains('state=__test_state__', $authorize_url_query);
}