function FormObjectTest::setUp

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()
  2. 8.9.x core/modules/system/tests/src/Kernel/Form/FormObjectTest.php \Drupal\Tests\system\Kernel\Form\FormObjectTest::setUp()
  3. 10 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 27

Class

FormObjectTest
Tests building a form from an object.

Namespace

Drupal\Tests\system\Kernel\Form

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.