You are here

protected function FormCacheTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php \Drupal\KernelTests\Core\Form\FormCacheTest::setUp()
  2. 9 core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php \Drupal\KernelTests\Core\Form\FormCacheTest::setUp()

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php, line 41

Class

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

Namespace

Drupal\KernelTests\Core\Form

Code

protected function setUp() : void {
  parent::setUp();
  $this->formBuildId = $this
    ->randomMachineName();
  $this->form = [
    '#property' => $this
      ->randomMachineName(),
  ];
  $this->formState = new FormState();
  $this->formState
    ->set('example', $this
    ->randomMachineName());
}