AuthenticationExceptionTest.php 861 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Exception\Test\Unit;
  7. use \Magento\Framework\Exception\AuthenticationException;
  8. use Magento\Framework\Phrase;
  9. /**
  10. * Class AuthenticationExceptionTest
  11. */
  12. class AuthenticationExceptionTest extends \PHPUnit\Framework\TestCase
  13. {
  14. /**
  15. * @return void
  16. */
  17. public function testConstructor()
  18. {
  19. $authenticationException = new AuthenticationException(
  20. new Phrase(
  21. 'An authentication error occurred. Verify and try again.',
  22. ['consumer_id' => 1, 'resources' => 'record2']
  23. )
  24. );
  25. $this->assertSame(
  26. 'An authentication error occurred. Verify and try again.',
  27. $authenticationException->getMessage()
  28. );
  29. }
  30. }