You are here

public function RolesTestMocked::testThatGetRolePermissionsRequestIncludesTotals in Auth0 Single Sign On 8.2

Test a get role permissions call including totals.

Return value

void

Throws

\Exception Should not be thrown in this test.

File

vendor/auth0/auth0-php/tests/API/Management/RolesMockedTest.php, line 315

Class

RolesTestMocked
Class RolesTestMocked.

Namespace

Auth0\Tests\API\Management

Code

public function testThatGetRolePermissionsRequestIncludesTotals() {
  $api = new MockManagementApi([
    new Response(200, self::$headers),
    new Response(200, self::$headers),
  ]);
  $api
    ->call()
    ->roles()
    ->getPermissions('__test_role_id__', [
    'include_totals' => false,
  ]);
  $this
    ->assertContains('include_totals=false', $api
    ->getHistoryQuery());
  $api
    ->call()
    ->roles()
    ->getPermissions('__test_role_id__', [
    'include_totals' => 1,
  ]);
  $this
    ->assertContains('include_totals=true', $api
    ->getHistoryQuery());
}