Sha512Test.php 868 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * This file is part of Lcobucci\JWT, a simple library to handle JWT and JWS
  4. *
  5. * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
  6. */
  7. namespace Lcobucci\JWT\Signer\Rsa;
  8. /**
  9. * @author Luís Otávio Cobucci Oblonczyk <lcobucci@gmail.com>
  10. * @since 2.1.0
  11. */
  12. class Sha512Test extends \PHPUnit_Framework_TestCase
  13. {
  14. /**
  15. * @test
  16. *
  17. * @covers Lcobucci\JWT\Signer\Rsa\Sha512::getAlgorithmId
  18. */
  19. public function getAlgorithmIdMustBeCorrect()
  20. {
  21. $signer = new Sha512();
  22. $this->assertEquals('RS512', $signer->getAlgorithmId());
  23. }
  24. /**
  25. * @test
  26. *
  27. * @covers Lcobucci\JWT\Signer\Rsa\Sha512::getAlgorithm
  28. */
  29. public function getAlgorithmMustBeCorrect()
  30. {
  31. $signer = new Sha512();
  32. $this->assertEquals(OPENSSL_ALGO_SHA512, $signer->getAlgorithm());
  33. }
  34. }