InputMismatchExceptionTest.php 850 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Input mismatch 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\InputMismatchException;
  10. use Magento\Framework\Phrase;
  11. class InputMismatchExceptionTest extends \PHPUnit\Framework\TestCase
  12. {
  13. /**
  14. * @return void
  15. */
  16. public function testConstructor()
  17. {
  18. $instanceClass = \Magento\Framework\Exception\State\InputMismatchException::class;
  19. $message = 'message %1 %2';
  20. $params = [
  21. 'parameter1',
  22. 'parameter2',
  23. ];
  24. $cause = new \Exception();
  25. $stateException = new InputMismatchException(new Phrase($message, $params), $cause);
  26. $this->assertInstanceOf($instanceClass, $stateException);
  27. }
  28. }