Skip to content

Commit 270e8e4

Browse files
committed
Small adjustments
1 parent 988309d commit 270e8e4

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

app/code/Magento/Csp/Test/Unit/Model/Mode/ConfigManagerTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
use RuntimeException;
2121

2222
/**
23-
* Class ConfigManagerTest
24-
*
2523
* Test for \Magento\Csp\Model\Mode\ConfigManager
2624
*/
2725
class ConfigManagerTest extends TestCase
@@ -71,16 +69,16 @@ protected function setUp()
7169
* Test throwing an exception for non storefront or admin areas
7270
*
7371
* @return void
74-
*
75-
* @expectedExceptionMessage CSP can only be configured for storefront or admin area
76-
* @expectedException RuntimeException
7772
*/
7873
public function testThrownExceptionForCrontabArea()
7974
{
8075
$this->stateMock->expects($this->any())
8176
->method('getAreaCode')
8277
->willReturn(Area::AREA_CRONTAB);
8378

79+
$this->expectExceptionMessage('CSP can only be configured for storefront or admin area');
80+
$this->expectException(RuntimeException::class);
81+
8482
$this->model->getConfigured();
8583
}
8684

app/code/Magento/Csp/Test/Unit/Model/PolicyRendererPoolTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
use RuntimeException;
1818

1919
/**
20-
* Class PolicyRendererPoolTest
21-
*
2220
* Test for \Magento\Csp\Model\PolicyRendererPool
2321
*/
2422
class PolicyRendererPoolTest extends TestCase
@@ -66,16 +64,16 @@ protected function setUp()
6664
* Test throwing an exception for not found policy renders
6765
*
6866
* @return void
69-
*
70-
* @expectedExceptionMessage Failed to find a renderer for policy
71-
* @expectedException RuntimeException
7267
*/
7368
public function testThrownExceptionForNotFoundPolicyRenders()
7469
{
7570
$this->policyMock->expects($this->any())
7671
->method('getId')
7772
->willReturn(static::STUB_POLICY_ID);
7873

74+
$this->expectExceptionMessage('Failed to find a renderer for policy');
75+
$this->expectException(RuntimeException::class);
76+
7977
$this->model->getRenderer($this->policyMock);
8078
}
8179

0 commit comments

Comments
 (0)