public function ValidationTest::testDisabledToken in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Form/ValidationTest.php \Drupal\Tests\system\Functional\Form\ValidationTest::testDisabledToken()
- 9 core/modules/system/tests/src/Functional/Form/ValidationTest.php \Drupal\Tests\system\Functional\Form\ValidationTest::testDisabledToken()
Tests that a form with a disabled CSRF token can be validated.
File
- core/
modules/ system/ tests/ src/ Functional/ Form/ ValidationTest.php, line 82
Class
- ValidationTest
- Tests form processing and alteration via form validation handlers.
Namespace
Drupal\Tests\system\Functional\FormCode
public function testDisabledToken() {
$this
->drupalGet('form-test/validate-no-token');
$this
->submitForm([], 'Save');
$this
->assertSession()
->pageTextContains('The form_test_validate_no_token form has been submitted successfully.');
}