Same filename and directory in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Form/fixtures/form_base_test.inc
- 9 core/tests/Drupal/Tests/Core/Form/fixtures/form_base_test.inc
File
core/tests/Drupal/Tests/Core/Form/fixtures/form_base_test.inc
View source
<?php
declare (strict_types=1);
function test_form_id() {
$form['test'] = [
'#type' => 'textfield',
'#title' => 'Test',
];
$form['options'] = [
'#type' => 'radios',
'#options' => [
'foo' => 'foo',
'bar' => 'bar',
],
];
$form['value'] = [
'#type' => 'value',
'#value' => 'bananas',
];
$form['actions'] = [
'#type' => 'actions',
];
$form['actions']['submit'] = [
'#type' => 'submit',
'#value' => 'Submit',
];
return $form;
}
Functions