You are here

public function JWKFetcherTest::testThatGetFormattedEmptyJwksReturnsEmptyArray in Auth0 Single Sign On 8.2

File

vendor/auth0/auth0-php/tests/Helpers/JWKFetcherTest.php, line 40

Class

JWKFetcherTest
Class JWKFetcherTest.

Namespace

Auth0\Tests\Helpers

Code

public function testThatGetFormattedEmptyJwksReturnsEmptyArray() {
  $jwks = new MockJwks([
    new Response(200, [
      'Content-Type' => 'application/json',
    ], '{}'),
    new Response(200, [
      'Content-Type' => 'application/json',
    ], '{keys:[]}'),
  ]);
  $jwks_formatted = $jwks
    ->call()
    ->getKeys(uniqid());
  $this
    ->assertEquals([], $jwks_formatted);
  $jwks_formatted = $jwks
    ->call()
    ->getKeys(uniqid());
  $this
    ->assertEquals([], $jwks_formatted);
}