public function ConnectionsTestMocked::testConnectionsGetAll in Auth0 Single Sign On 8.2
Test a basic getAll connection call.
Return value
void
Throws
\Exception Unsuccessful HTTP call.
File
- vendor/
auth0/ auth0-php/ tests/ API/ Management/ ConnectionsMockedTest.php, line 59
Class
- ConnectionsTestMocked
- Class ConnectionsTestMocked.
Namespace
Auth0\Tests\API\ManagementCode
public function testConnectionsGetAll() {
$api = new MockManagementApi([
new Response(200, self::$headers),
]);
$api
->call()
->connections()
->getAll();
$this
->assertEquals('GET', $api
->getHistoryMethod());
$this
->assertEquals('https://api.test.local/api/v2/connections', $api
->getHistoryUrl());
$this
->assertEmpty($api
->getHistoryQuery());
$headers = $api
->getHistoryHeaders();
$this
->assertEquals('Bearer __api_token__', $headers['Authorization'][0]);
$this
->assertEquals(self::$expectedTelemetry, $headers['Auth0-Client'][0]);
}