You are here

public function UsersMockedTest::testThatDeleteMfProviderIsFormattedProperly in Auth0 Single Sign On 8.2

Test a delete multifactor provider call.

Return value

void

Throws

\Exception Should not be thrown in this test.

File

vendor/auth0/auth0-php/tests/API/Management/UsersMockedTest.php, line 516

Class

UsersMockedTest
Class UsersMockedTest.

Namespace

Auth0\Tests\API\Management

Code

public function testThatDeleteMfProviderIsFormattedProperly() {
  $api = new MockManagementApi([
    new Response(200, self::$headers),
  ]);
  $api
    ->call()
    ->users()
    ->deleteMultifactorProvider('__test_user_id__', 'duo');
  $this
    ->assertEquals('DELETE', $api
    ->getHistoryMethod());
  $this
    ->assertEquals('https://api.test.local/api/v2/users/__test_user_id__/multifactor/duo', $api
    ->getHistoryUrl());
  $headers = $api
    ->getHistoryHeaders();
  $this
    ->assertEquals('Bearer __api_token__', $headers['Authorization'][0]);
  $this
    ->assertEquals(self::$expectedTelemetry, $headers['Auth0-Client'][0]);
}