summaryrefslogtreecommitdiffstats
path: root/tests/JWTTest.php
diff options
context:
space:
mode:
authorMartin Cocaro <martin.cocaro@gmail.com>2015-06-17 16:16:06 -0700
committerMartin Cocaro <martin.cocaro@gmail.com>2015-06-17 16:16:06 -0700
commitabc1f5bdd199d20c2c1f63894bafabb85cb0b19f (patch)
treed749f2c69facc55daf6e3d99739a63f1271c2032 /tests/JWTTest.php
parent2de26c2e0e5813d57fff1008ed6c253df9e2bc04 (diff)
downloadphp-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.php6
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');
+ }
}