Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala committed Feb 8, 2024
1 parent b898f03 commit 591e0e7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/DeferBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@

class DeferBackendTest extends SapphireTest
{
public function testWriteToHeader():void
public function testWriteToHeader(): void
{
$backend = new DeferBackend;
$this->assertFalse($backend->writeJavascriptToBody);
}

public function testNonce():void
public function testNonce(): void
{
$this->assertNotEmpty(CspProvider::getCspNonce());
}

public function testProvideTemplate():void
public function testProvideTemplate(): void
{
$this->assertContains("getCspNonce", CspProvider::get_template_global_variables());
}

public function testAddSecurityHeaders():void
public function testAddSecurityHeaders(): void
{
$res = new HTTPResponse();
CspProvider::addSecurityHeaders($res);
Expand All @@ -34,7 +34,7 @@ public function testAddSecurityHeaders():void
$this->assertContains('referrer-policy', $headers, "Header not found in : " . implode(", ", $headers));
}

public function testWrapScripts():void
public function testWrapScripts(): void
{
$backend = new DeferBackend;
$backend->customScript("var test = 'test';");
Expand Down

0 comments on commit 591e0e7

Please sign in to comment.