public function CspTest::testInvalidValue in Content-Security-Policy 8
Test that invalid directive values cause an exception.
@covers ::appendDirective
File
- tests/
src/ Unit/ CspTest.php, line 398
Class
- CspTest
- Test manipulating directives in a policy.
Namespace
Drupal\Tests\csp\UnitCode
public function testInvalidValue() {
$this
->expectException(\InvalidArgumentException::class);
$policy = new Csp();
$policy
->appendDirective('default-src', 12);
}