public function SecKitTestCaseTest::testOriginAllowsSite in Security Kit 8
Same name and namespace in other branches
- 2.x tests/src/Functional/SecKitTestCaseTest.php \Drupal\Tests\seckit\Functional\SecKitTestCaseTest::testOriginAllowsSite()
Tests HTTP Origin allows requests from the site.
File
- tests/
src/ Functional/ SecKitTestCaseTest.php, line 389
Class
- SecKitTestCaseTest
- Functional tests for Security Kit.
Namespace
Drupal\Tests\seckit\FunctionalCode
public function testOriginAllowsSite() {
$form['seckit_csrf[origin]'] = TRUE;
$this
->drupalPostForm('admin/config/system/seckit', $form, t('Save configuration'));
$this->originHeader = \Drupal::request()
->getSchemeAndHttpHost();
$this
->drupalPostForm('admin/config/system/seckit', $form, t('Save configuration'));
$this
->assertSession()
->statusCodeEquals(200);
}