Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
StateExceptionTest.php
Go to the documentation of this file.
1 <?php
8 
9 use \Magento\Framework\Exception\StateException;
11 
15 class StateExceptionTest extends \PHPUnit\Framework\TestCase
16 {
20  public function testStateExceptionInstance()
21  {
22  $instanceClass = \Magento\Framework\Exception\StateException::class;
23  $message = 'message %1 %2';
24  $params = [
25  'parameter1',
26  'parameter2',
27  ];
28  $cause = new \Exception();
29  $stateException = new StateException(new Phrase($message, $params), $cause);
30  $this->assertInstanceOf($instanceClass, $stateException);
31  }
32 }
$message
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18