You are here

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

File

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

Class

UsersMockedTest
Class UsersMockedTest.

Namespace

Auth0\Tests\API\Management

Code

public function testThatExceptionIsThrownWhenConnectionIsMissing() {
  $api = new Management(uniqid(), uniqid());
  try {
    $api
      ->users()
      ->create([]);
    $exception_message = '';
  } catch (\Exception $e) {
    $exception_message = $e
      ->getMessage();
  }
  $this
    ->assertContains('Missing required "connection" field', $exception_message);
}