public function FormTest::testGetFormsCsrfToken in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Form/FormTest.php \Drupal\system\Tests\Form\FormTest::testGetFormsCsrfToken()
CSRF tokens for GET forms should not be added by default.
File
- core/
modules/ system/ src/ Tests/ Form/ FormTest.php, line 300 - Contains \Drupal\system\Tests\Form\FormTest.
Class
- FormTest
- Tests various form element validation mechanisms.
Namespace
Drupal\system\Tests\FormCode
public function testGetFormsCsrfToken() {
// We need to be logged in to have CSRF tokens.
$account = $this
->createUser();
$this
->drupalLogin($account);
$this
->drupalGet(Url::fromRoute('form_test.get_form'));
$this
->assertNoRaw('form_token');
}