ExpiredExceptionTest.php 853 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Expired exception
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework\Exception\Test\Unit\State;
  9. use \Magento\Framework\Exception\State\ExpiredException;
  10. use Magento\Framework\Phrase;
  11. /**
  12. * Class ExpiredException
  13. */
  14. class ExpiredExceptionTest extends \PHPUnit\Framework\TestCase
  15. {
  16. /**
  17. * @return void
  18. */
  19. public function testConstructor()
  20. {
  21. $instanceClass = \Magento\Framework\Exception\State\ExpiredException::class;
  22. $message = 'message %1 %2';
  23. $params = [
  24. 'parameter1',
  25. 'parameter2',
  26. ];
  27. $cause = new \Exception();
  28. $stateException = new ExpiredException(new Phrase($message, $params), $cause);
  29. $this->assertInstanceOf($instanceClass, $stateException);
  30. }
  31. }