summaryrefslogtreecommitdiffstats
path: root/tests/JWTTest.php
diff options
context:
space:
mode:
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 6c996b2..f06f34e 100644
--- a/tests/JWTTest.php
+++ b/tests/JWTTest.php
@@ -235,4 +235,10 @@ class JWTTest extends PHPUnit_Framework_TestCase
$msg = JWT::encode('abc', 'my_key', 'HS256', null, array('cty' => 'test-eit;v=1'));
$this->assertEquals(JWT::decode($msg, 'my_key', array('HS256')), 'abc');
}
+
+ public function testInvalidSegmentCount()
+ {
+ $this->setExpectedException('UnexpectedValueException');
+ JWT::decode('brokenheader.brokenbody', 'my_key', array('HS256'));
+ }
}