菜谱项目

JWTProviderTest.php 749B

12345678910111213141516171819202122232425262728293031323334353637
  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 Mockery;
  12. use Tymon\JWTAuth\Test\Stubs\JWTProviderStub;
  13. class JWTProviderTest extends \PHPUnit_Framework_TestCase
  14. {
  15. public function setUp()
  16. {
  17. $this->provider = new JWTProviderStub('secret', 'HS256');
  18. }
  19. public function tearDown()
  20. {
  21. Mockery::close();
  22. }
  23. /** @test */
  24. public function it_should_set_the_algo()
  25. {
  26. $this->provider->setAlgo('HS512');
  27. $this->assertEquals('HS512', $this->provider->getAlgo());
  28. }
  29. }