class FormObjectTest
Same name in this branch
- 9 core/modules/system/tests/src/Functional/Form/FormObjectTest.php \Drupal\Tests\system\Functional\Form\FormObjectTest
Same name and namespace in other branches
- 11.x core/modules/system/tests/src/Kernel/Form/FormObjectTest.php \Drupal\Tests\system\Kernel\Form\FormObjectTest
- 11.x core/modules/system/tests/src/Functional/Form/FormObjectTest.php \Drupal\Tests\system\Functional\Form\FormObjectTest
- 10 core/modules/system/tests/src/Kernel/Form/FormObjectTest.php \Drupal\Tests\system\Kernel\Form\FormObjectTest
- 10 core/modules/system/tests/src/Functional/Form/FormObjectTest.php \Drupal\Tests\system\Functional\Form\FormObjectTest
- 8.9.x core/modules/system/tests/src/Kernel/Form/FormObjectTest.php \Drupal\Tests\system\Kernel\Form\FormObjectTest
- 8.9.x core/modules/system/tests/src/Functional/Form/FormObjectTest.php \Drupal\Tests\system\Functional\Form\FormObjectTest
Tests building a form from an object.
@group Form
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\KernelTests\ConfigFormTestBase extends \Drupal\KernelTests\KernelTestBase
- class \Drupal\Tests\system\Kernel\Form\FormObjectTest extends \Drupal\KernelTests\ConfigFormTestBase
- class \Drupal\KernelTests\ConfigFormTestBase extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of FormObjectTest
File
-
core/
modules/ system/ tests/ src/ Kernel/ Form/ FormObjectTest.php, line 13
Namespace
Drupal\Tests\system\Kernel\FormView source
class FormObjectTest extends ConfigFormTestBase {
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'form_test',
];
/**
* {@inheritdoc}
*/
protected function setUp() : void {
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',
],
];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.