You are here

public function TokenTest::testThatMissingAudThrowsException in Auth0 Single Sign On 8.2

Test for audience config param.

Return value

void

File

vendor/auth0/auth0-php/tests/API/Helpers/TokenGeneratorTest.php, line 55

Class

TokenTest
Class TokenTest

Namespace

Auth0\Tests\Api\Helpers

Code

public function testThatMissingAudThrowsException() {
  $caught_exception = false;
  try {
    new JWTVerifier([]);
  } catch (CoreException $e) {
    $caught_exception = $this
      ->errorHasString($e, 'The audience is mandatory');
  }
  $this
    ->assertTrue($caught_exception);
}