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