You are here

function StorageTest::testValidation in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Form/StorageTest.php \Drupal\system\Tests\Form\StorageTest::testValidation()

Tests validation when form storage is used.

File

core/modules/system/src/Tests/Form/StorageTest.php, line 95
Contains \Drupal\system\Tests\Form\StorageTest.

Class

StorageTest
Tests a multistep form using form storage and makes sure validation and caching works right.

Namespace

Drupal\system\Tests\Form

Code

function testValidation() {
  $this
    ->drupalPostForm('form_test/form-storage', array(
    'title' => '',
    'value' => 'value_is_set',
  ), 'Continue submit');
  $this
    ->assertPattern('/value_is_set/', 'The input values have been kept.');
}