Skip to content

Commit

Permalink
fix: add missing use statement in JWK (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
pendenga authored Feb 12, 2021
1 parent 1fae8c4 commit f42c911
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/JWK.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Firebase\JWT;

use DomainException;
use InvalidArgumentException;
use UnexpectedValueException;

/**
Expand Down
14 changes: 14 additions & 0 deletions tests/JWKTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@ public function testParseJwkKeySet()
self::$keys = $keys;
}

public function testParseJwkKey_empty()
{
$this->setExpectedException('InvalidArgumentException', 'JWK must not be empty');

JWK::parseKeySet(array('keys' => array(array())));
}

public function testParseJwkKeySet_empty()
{
$this->setExpectedException('InvalidArgumentException', 'JWK Set did not contain any keys');

JWK::parseKeySet(array('keys' => array()));
}

/**
* @depends testParseJwkKeySet
*/
Expand Down

0 comments on commit f42c911

Please sign in to comment.