public function FormBuilderTest::providerTestBuildFormWithTriggeringElement in Drupal 8
Same name and namespace 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()
Data provider for ::testBuildFormWithTriggeringElement().
File
- core/
tests/ Drupal/ Tests/ Core/ Form/ FormBuilderTest.php, line 328 - Contains \Drupal\Tests\Core\Form\FormBuilderTest.
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,
],
];
}