You are here

public function CspSettingsFormTest::testIsValidHost in Content-Security-Policy 8

Valid host source values.

@dataProvider urlDataProvider

Parameters

string $url: A URL.

bool $valid: TRUE if the url should be valid.

File

tests/src/Unit/Form/CspSettingsFormTest.php, line 90

Class

CspSettingsFormTest
Test CSP Settings Form.

Namespace

Drupal\Tests\csp\Unit\Form

Code

public function testIsValidHost(string $url, bool $valid = TRUE) {
  $this
    ->assertEquals($valid, HostValidator::isValidHost($url));
}