FormObjectTest.php in Drupal 10
File
core/modules/system/tests/src/Kernel/Form/FormObjectTest.php
View source
<?php
namespace Drupal\Tests\system\Kernel\Form;
use Drupal\form_test\FormTestObject;
use Drupal\KernelTests\ConfigFormTestBase;
class FormObjectTest extends ConfigFormTestBase {
protected static $modules = [
'form_test',
];
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',
],
];
}
}