You are here

public function BlacklistsTest::testThatGetAllRequestIsFormedProperly in Auth0 Single Sign On 8.2

Throws

\Exception Should not be thrown in this test.

File

vendor/auth0/auth0-php/tests/API/Management/BlacklistsTest.php, line 39

Class

BlacklistsTest

Namespace

Auth0\Tests\API\Management

Code

public function testThatGetAllRequestIsFormedProperly() {
  $api = new MockManagementApi([
    new Response(200, self::$headers),
  ]);
  $api
    ->call()
    ->blacklists()
    ->getAll('__test_aud__');
  $this
    ->assertEquals('GET', $api
    ->getHistoryMethod());
  $this
    ->assertStringStartsWith('https://api.test.local/api/v2/blacklists/tokens', $api
    ->getHistoryUrl());
  $this
    ->assertEquals('aud=__test_aud__', $api
    ->getHistoryQuery());
  $headers = $api
    ->getHistoryHeaders();
  $this
    ->assertEquals('Bearer __api_token__', $headers['Authorization'][0]);
  $this
    ->assertEquals(self::$expectedTelemetry, $headers['Auth0-Client'][0]);
}