public function ConnectionsTestMocked::testConnectionsDeleteUser in Auth0 Single Sign On 8.2
Test a delete user for connection request.
Return value
void
Throws
\Exception Unsuccessful HTTP call.
File
- vendor/
auth0/ auth0-php/ tests/ API/ Management/ ConnectionsMockedTest.php, line 290
Class
- ConnectionsTestMocked
- Class ConnectionsTestMocked.
Namespace
Auth0\Tests\API\ManagementCode
public function testConnectionsDeleteUser() {
$api = new MockManagementApi([
new Response(204),
]);
$id = 'con_testConnection10';
$email = 'con_testConnection10@auth0.com';
$api
->call()
->connections()
->deleteUser($id, $email);
$this
->assertEquals('DELETE', $api
->getHistoryMethod());
$this
->assertContains('https://api.test.local/api/v2/connections/' . $id . '/users', $api
->getHistoryUrl());
$this
->assertEquals('email=' . $email, $api
->getHistoryQuery());
$headers = $api
->getHistoryHeaders();
$this
->assertEquals('Bearer __api_token__', $headers['Authorization'][0]);
$this
->assertEquals(self::$expectedTelemetry, $headers['Auth0-Client'][0]);
}