From ba986f9c9b402c1cca815df4476e3a1ed995956f Mon Sep 17 00:00:00 2001 From: bepsvpt <8221099+bepsvpt@users.noreply.github.com> Date: Mon, 16 Dec 2024 23:42:23 +0800 Subject: [PATCH] tests: add frame-ancestors none test case --- tests/Builders/ContentSecurityPolicyBuilderTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Builders/ContentSecurityPolicyBuilderTest.php b/tests/Builders/ContentSecurityPolicyBuilderTest.php index 76b8f76..594ed1d 100644 --- a/tests/Builders/ContentSecurityPolicyBuilderTest.php +++ b/tests/Builders/ContentSecurityPolicyBuilderTest.php @@ -160,6 +160,17 @@ public function testSeldomUsedDirectives() 'report-to csp-report', (new ContentSecurityPolicyBuilder($config))->get() ); + + $config = [ + 'frame-ancestors' => [ + 'none' => true, + ], + ]; + + $this->assertSame( + "frame-ancestors 'none'", + (new ContentSecurityPolicyBuilder($config))->get() + ); } public function testSchemeAutoAppendColon()