public function UsersMockedTest::testThatGetAllUsersWithPerPageIsFormattedProperly in Auth0 Single Sign On 8.2
Test that the per_page value is kept as an absolute integer.
Return value
void
Throws
\Exception Should not be thrown in this test.
File
- vendor/
auth0/ auth0-php/ tests/ API/ Management/ UsersMockedTest.php, line 388
Class
- UsersMockedTest
- Class UsersMockedTest.
Namespace
Auth0\Tests\API\ManagementCode
public function testThatGetAllUsersWithPerPageIsFormattedProperly() {
$api = new MockManagementApi([
new Response(200, self::$headers),
new Response(200, self::$headers),
]);
$api
->call()
->users()
->getAll([], [], null, null, 10);
$query = $api
->getHistoryQuery();
$this
->assertContains('per_page=10', $query);
$api
->call()
->users()
->getAll([], [], null, null, -10);
$query = $api
->getHistoryQuery();
$this
->assertContains('per_page=10', $query);
}