You are here

protected function FormCacheTest::setUp in Zircon Profile 8

Same name in this branch
  1. 8 core/tests/Drupal/Tests/Core/Form/FormCacheTest.php \Drupal\Tests\Core\Form\FormCacheTest::setUp()
  2. 8 core/modules/system/src/Tests/Form/FormCacheTest.php \Drupal\system\Tests\Form\FormCacheTest::setUp()
Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Form/FormCacheTest.php \Drupal\system\Tests\Form\FormCacheTest::setUp()

Performs setup tasks before each individual test method is run.

Overrides KernelTestBase::setUp

File

core/modules/system/src/Tests/Form/FormCacheTest.php, line 45
Contains \Drupal\system\Tests\Form\FormCacheTest.

Class

FormCacheTest
Tests \Drupal::formBuilder()->setCache() and \Drupal::formBuilder()->getCache().

Namespace

Drupal\system\Tests\Form

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installSchema('system', array(
    'key_value_expire',
  ));
  $this->formBuildId = $this
    ->randomMachineName();
  $this->form = array(
    '#property' => $this
      ->randomMachineName(),
  );
  $this->formState = new FormState();
  $this->formState
    ->set('example', $this
    ->randomMachineName());
}