diff options
author | Martin Cocaro <martin.cocaro@gmail.com> | 2015-06-17 16:16:06 -0700 |
---|---|---|
committer | Martin Cocaro <martin.cocaro@gmail.com> | 2015-06-17 16:16:06 -0700 |
commit | abc1f5bdd199d20c2c1f63894bafabb85cb0b19f (patch) | |
tree | d749f2c69facc55daf6e3d99739a63f1271c2032 /tests/JWTTest.php | |
parent | 2de26c2e0e5813d57fff1008ed6c253df9e2bc04 (diff) | |
download | php-jwt-abc1f5bdd199d20c2c1f63894bafabb85cb0b19f.zip php-jwt-abc1f5bdd199d20c2c1f63894bafabb85cb0b19f.tar.gz php-jwt-abc1f5bdd199d20c2c1f63894bafabb85cb0b19f.tar.bz2 |
Adding test
Diffstat (limited to 'tests/JWTTest.php')
-rw-r--r-- | tests/JWTTest.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/JWTTest.php b/tests/JWTTest.php index 0605e4c..2aeb201 100644 --- a/tests/JWTTest.php +++ b/tests/JWTTest.php @@ -228,4 +228,10 @@ class JWTTest extends PHPUnit_Framework_TestCase $this->setExpectedException('DomainException'); JWT::decode($msg, 'my_key'); } + + public function testAdditionalHeaders() + { + $msg = JWT::encode('abc', 'my_key', 'HS256', null, array('cty' => 'test-eit;v=1')); + $this->assertEquals(JWT::decode($msg, 'my_key', array('HS256')), 'abc'); + } } |