菜谱项目

TokenTest.php 776B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /*
  3. * This file is part of jwt-auth.
  4. *
  5. * (c) Sean Tymon <tymon148@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Tymon\JWTAuth\Test\Providers\JWT;
  11. use Tymon\JWTAuth\Token;
  12. class TokenTest extends \PHPUnit_Framework_TestCase
  13. {
  14. public function setUp()
  15. {
  16. $this->token = new Token('foo.bar.baz');
  17. }
  18. /** @test */
  19. public function it_should_return_the_token_when_casting_to_a_string()
  20. {
  21. $this->assertEquals((string) $this->token, $this->token);
  22. }
  23. /** @test */
  24. public function it_should_return_the_token_when_calling_get_method()
  25. {
  26. $this->assertInternalType('string', $this->token->get());
  27. }
  28. }