jingcai-php/vendor/tymon/jwt-auth/tests/Claims/NotBeforeTest.php

29 lines
722 B
PHP
Executable File

<?php
/*
* This file is part of jwt-auth.
*
* (c) Sean Tymon <tymon148@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tymon\JWTAuth\Test\Claims;
use Tymon\JWTAuth\Claims\NotBefore;
use Tymon\JWTAuth\Exceptions\InvalidClaimException;
use Tymon\JWTAuth\Test\AbstractTestCase;
class NotBeforeTest extends AbstractTestCase
{
/** @test */
public function it_should_throw_an_exception_when_passing_an_invalid_value()
{
$this->expectException(InvalidClaimException::class);
$this->expectExceptionMessage('Invalid value provided for claim [nbf]');
new NotBefore('foo');
}
}