File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
lib/internal/Magento/Framework/App Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ public function __construct(
59
59
*
60
60
* @param string $value
61
61
* @return void
62
- * @codeCoverageIgnore
63
62
*/
64
63
public function setXFrameOptions ($ value )
65
64
{
Original file line number Diff line number Diff line change 8
8
9
9
/**
10
10
* Adds an X-FRAME-OPTIONS header to HTTP responses to safeguard against click-jacking.
11
- * @codeCoverageIgnore
12
11
*/
13
12
class XFrameOptPlugin
14
13
{
@@ -35,6 +34,7 @@ public function __construct($xFrameOpt)
35
34
/**
36
35
* @param \Magento\Framework\App\Response\Http $subject
37
36
* @return void
37
+ * @codeCoverageIgnore
38
38
*/
39
39
public function beforeSendResponse (\Magento \Framework \App \Response \Http $ subject )
40
40
{
Original file line number Diff line number Diff line change @@ -271,4 +271,11 @@ public function testWakeUpWith()
271
271
\Magento \Framework \App \ObjectManager::setInstance ($ objectManagerMock );
272
272
$ this ->model ->__wakeup ();
273
273
}
274
+
275
+ public function testSetXFrameOptions ()
276
+ {
277
+ $ value = 'SAMEORIGIN ' ;
278
+ $ this ->model ->setXFrameOptions ($ value );
279
+ $ this ->assertSame ($ value , $ this ->model ->getHeader (Http::HEADER_X_FRAME_OPT )->getFieldValue ());
280
+ }
274
281
}
You can’t perform that action at this time.
0 commit comments