Skip to content

Commit

Permalink
test: add test to remove report-uri
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Aug 2, 2024
1 parent 80e9d3f commit 5ba2b78
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/system/HTTP/ContentSecurityPolicyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,19 @@ public function testReportURI(): void
$this->assertStringContainsString('report-uri http://example.com/csptracker;', $result);
}

#[PreserveGlobalState(false)]
#[RunInSeparateProcess]
public function testRemoveReportURI(): void
{
$this->prepare();
$this->csp->reportOnly(false);
$this->csp->setReportURI('');
$this->work();

$result = $this->getHeaderEmitted('Content-Security-Policy');
$this->assertStringNotContainsString('report-uri ', $result);
}

#[PreserveGlobalState(false)]
#[RunInSeparateProcess]
public function testSandboxFlags(): void
Expand Down

0 comments on commit 5ba2b78

Please sign in to comment.