function FormBuilderTest::providerTestBuildFormWithTriggeringElement
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php \Drupal\Tests\Core\Form\FormBuilderTest::providerTestBuildFormWithTriggeringElement()
- 10 core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php \Drupal\Tests\Core\Form\FormBuilderTest::providerTestBuildFormWithTriggeringElement()
- 11.x core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php \Drupal\Tests\Core\Form\FormBuilderTest::providerTestBuildFormWithTriggeringElement()
Data provider for ::testBuildFormWithTriggeringElement().
File
-
core/
tests/ Drupal/ Tests/ Core/ Form/ FormBuilderTest.php, line 328
Class
- FormBuilderTest
- @coversDefaultClass \Drupal\Core\Form\FormBuilder @group Form
Namespace
Drupal\Tests\Core\FormCode
public function providerTestBuildFormWithTriggeringElement() {
$plain_text = 'Other submit value';
$markup = 'Other submit <input> value';
return [
'plain-text' => [
$plain_text,
$plain_text,
],
'markup' => [
$markup,
$markup,
],
// Note: The input is always decoded, see
// \Drupal\Core\Form\FormBuilder::buttonWasClicked, so we do not need to
// escape the input.
'escaped-markup' => [
Html::escape($markup),
$markup,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.