Skip to content

Commit

Permalink
Remove test for removed Auth0JWT class
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcanhelp committed Oct 16, 2019
1 parent 2d1f3ee commit e56f6f8
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions tests/API/Helpers/TokenGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,22 +423,4 @@ public function testSuccessfulRs256TokenDecoding()
$this->assertObjectHasAttribute('sub', $decoded);
$this->assertEquals($expected_sub, $decoded->sub);
}

/**
* Test the deprecated Auth0JWT::decode() method.
*
* @return void
*/
public function testDeprecatedTestTokenGenerationDecode()
{
$token_generator = new TokenGenerator( self::CLIENT_ID, self::CLIENT_SECRET );
$jwt = $token_generator->generate(['users' => ['actions' => ['read']]]);
$decoded = Auth0JWT::decode($jwt, self::CLIENT_ID, self::CLIENT_SECRET);
$this->assertObjectHasAttribute('aud', $decoded);
$this->assertEquals(self::CLIENT_ID, $decoded->aud);
$this->assertObjectHasAttribute('scopes', $decoded);
$this->assertObjectHasAttribute('users', $decoded->scopes);
$this->assertObjectHasAttribute('actions', $decoded->scopes->users);
$this->assertArraySubset(['read'], $decoded->scopes->users->actions);
}
}

0 comments on commit e56f6f8

Please sign in to comment.