You are here

protected function FormObjectTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Kernel/Form/FormObjectTest.php \Drupal\Tests\system\Kernel\Form\FormObjectTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/system/tests/src/Kernel/Form/FormObjectTest.php, line 22

Class

FormObjectTest
Tests building a form from an object.

Namespace

Drupal\Tests\system\Kernel\Form

Code

protected function setUp() {
  parent::setUp();
  $this->form = new FormTestObject($this->container
    ->get('config.factory'));
  $this->values = [
    'bananas' => [
      '#value' => $this
        ->randomString(10),
      '#config_name' => 'form_test.object',
      '#config_key' => 'bananas',
    ],
  ];
}