public function StorageTest::testValidation in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Form/StorageTest.php \Drupal\Tests\system\Functional\Form\StorageTest::testValidation()
- 9 core/modules/system/tests/src/Functional/Form/StorageTest.php \Drupal\Tests\system\Functional\Form\StorageTest::testValidation()
Tests validation when form storage is used.
File
- core/
modules/ system/ tests/ src/ Functional/ Form/ StorageTest.php, line 104
Class
- StorageTest
- Tests a multistep form using form storage and makes sure validation and caching works right.
Namespace
Drupal\Tests\system\Functional\FormCode
public function testValidation() {
$this
->drupalGet('form_test/form-storage');
$this
->submitForm([
'title' => '',
'value' => 'value_is_set',
], 'Continue submit');
// Ensure that the input values have been kept.
$this
->assertSession()
->responseMatches('/value_is_set/');
}