summaryrefslogtreecommitdiffstats
path: root/tests/JWTTest.php
diff options
context:
space:
mode:
authorLuis Miguel Cabral <luis.miguel.cabral@pearson.com>2015-05-11 12:32:11 +0200
committerLuis Miguel Cabral <luis.miguel.cabral@pearson.com>2015-05-11 12:32:11 +0200
commit3d9bd0ab1f738e354bd9c420c9564f5d4500c93c (patch)
tree5f9fb0c89631b2913ecb08e6d60ec205be152753 /tests/JWTTest.php
parent95fa9ae8ff71e3fc697befda39d9530cc15e5e8e (diff)
downloadphp-jwt-3d9bd0ab1f738e354bd9c420c9564f5d4500c93c.zip
php-jwt-3d9bd0ab1f738e354bd9c420c9564f5d4500c93c.tar.gz
php-jwt-3d9bd0ab1f738e354bd9c420c9564f5d4500c93c.tar.bz2
Reverted some tests from first commit
Diffstat (limited to 'tests/JWTTest.php')
-rw-r--r--tests/JWTTest.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/JWTTest.php b/tests/JWTTest.php
index ae59455..42fb5f9 100644
--- a/tests/JWTTest.php
+++ b/tests/JWTTest.php
@@ -38,11 +38,9 @@ class JWTTest extends PHPUnit_Framework_TestCase
public function testExpiredToken()
{
$this->setExpectedException('ExpiredException');
- $timeInPast = time() - 20;
$payload = array(
"message" => "abc",
- "exp" => $timeInPast // time in the past
- );
+ "exp" => time() - 20); // time in the past
$encoded = JWT::encode($payload, 'my_key');
JWT::decode($encoded, 'my_key', array('HS256'));
}
@@ -50,11 +48,9 @@ class JWTTest extends PHPUnit_Framework_TestCase
public function testBeforeValidTokenWithNbf()
{
$this->setExpectedException('BeforeValidException');
- $timeInFuture = time() + 20;
$payload = array(
"message" => "abc",
- "nbf" => $timeInFuture // time in the future
- );
+ "nbf" => time() + 20); // time in the future
$encoded = JWT::encode($payload, 'my_key');
JWT::decode($encoded, 'my_key', array('HS256'));
}
@@ -62,11 +58,9 @@ class JWTTest extends PHPUnit_Framework_TestCase
public function testBeforeValidTokenWithIat()
{
$this->setExpectedException('BeforeValidException');
- $timeInFuture = time() + 20;
$payload = array(
"message" => "abc",
- "iat" => $timeInFuture // time in the future
- );
+ "iat" => time() + 20); // time in the future
$encoded = JWT::encode($payload, 'my_key');
JWT::decode($encoded, 'my_key', array('HS256'));
}