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