public function SecKitTestCaseTest::testOriginAllowsSpecifiedSourceMultiWhitelist in Security Kit 8
Same name and namespace in other branches
- 2.x tests/src/Functional/SecKitTestCaseTest.php \Drupal\Tests\seckit\Functional\SecKitTestCaseTest::testOriginAllowsSpecifiedSourceMultiWhitelist()
Tests HTTP Origin allows requests from the specified source.
Includes multiple values in the whitelist.
File
- tests/
src/ Functional/ SecKitTestCaseTest.php, line 418
Class
- SecKitTestCaseTest
- Functional tests for Security Kit.
Namespace
Drupal\Tests\seckit\FunctionalCode
public function testOriginAllowsSpecifiedSourceMultiWhitelist() {
$form = [
'seckit_csrf[origin]' => TRUE,
'seckit_csrf[origin_whitelist]' => 'http://www.example.com, https://www.example.com, https://example.com:8080',
];
$this
->drupalPostForm('admin/config/system/seckit', $form, t('Save configuration'));
$this->originHeader = 'http://www.example.com';
$this
->drupalPostForm('admin/config/system/seckit', $form, t('Save configuration'));
$this
->assertSession()
->statusCodeEquals(200);
}