You are here

public function GrantsTestMocked::testThatGrantsGetByClientIdPaginates in Auth0 Single Sign On 8.2

Test that getByClientId adds pagination parameters to the request.

Return value

void

Throws

\Exception Unsuccessful HTTP call.

File

vendor/auth0/auth0-php/tests/API/Management/GrantsMockedTest.php, line 148

Class

GrantsTestMocked
Class GrantsTestMocked.

Namespace

Auth0\Tests\API\Management

Code

public function testThatGrantsGetByClientIdPaginates() {
  $api = new MockManagementApi([
    new Response(200),
  ]);
  $api
    ->call()
    ->grants()
    ->getByClientId('__test_client_id__', 1, 2);
  $this
    ->assertContains('page=1', $api
    ->getHistoryQuery());
  $this
    ->assertContains('per_page=2', $api
    ->getHistoryQuery());
}