Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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