public function ClientGrantsTest::testGetAllIncludeTotals in Auth0 Single Sign On 8.2
Test that the "include_totals" parameter works.
Return value
void
Throws
\Exception Thrown by the Guzzle HTTP client when there is a problem with the API call.
File
- vendor/
auth0/ auth0-php/ tests/ API/ Management/ ClientGrantsTest.php, line 149
Class
- ClientGrantsTest
- Class ClientGrantsTest. Tests the Auth0\SDK\API\Management\ClientGrants class.
Namespace
Auth0\Tests\APICode
public function testGetAllIncludeTotals() {
$expected_page = 0;
$expected_count = 2;
$results = self::$api
->getAll([
'include_totals' => true,
], $expected_page, $expected_count);
usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP);
$this
->assertArrayHasKey('total', $results);
$this
->assertEquals($expected_page * $expected_count, $results['start']);
$this
->assertEquals($expected_count, $results['limit']);
$this
->assertNotEmpty($results['client_grants']);
}