public function ConnectionsTestMocked::testThatConnectionsGetAllPaginates in Auth0 Single Sign On 8.2
Test a paginated getAll request.
Return value
void
Throws
\Exception Unsuccessful HTTP call.
File
- vendor/
auth0/ auth0-php/ tests/ API/ Management/ ConnectionsMockedTest.php, line 150
Class
- ConnectionsTestMocked
- Class ConnectionsTestMocked.
Namespace
Auth0\Tests\API\ManagementCode
public function testThatConnectionsGetAllPaginates() {
$api = new MockManagementApi([
new Response(200, self::$headers),
]);
$strategy = null;
$fields = null;
$include_fields = null;
$page = 0;
$per_page = 5;
$api
->call()
->connections()
->getAll($strategy, $fields, $include_fields, $page, $per_page);
$this
->assertEquals('GET', $api
->getHistoryMethod());
$this
->assertStringStartsWith('https://api.test.local/api/v2/connections', $api
->getHistoryUrl());
$this
->assertContains('page=0', $api
->getHistoryQuery());
$this
->assertContains('per_page=5', $api
->getHistoryQuery());
}