Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AuthorizationExceptionTest.php
Go to the documentation of this file.
1 <?php
8 
9 use \Magento\Framework\Exception\AuthorizationException;
11 
12 class AuthorizationExceptionTest extends \PHPUnit\Framework\TestCase
13 {
17  public function testConstructor()
18  {
19  $authorizationException = new AuthorizationException(
20  new Phrase(
21  'The consumer isn\'t authorized to access %resources.',
22  ['consumer_id' => 1, 'resources' => 'record2']
23  )
24  );
25  $this->assertSame("The consumer isn't authorized to access record2.", $authorizationException->getMessage());
26  }
27 }