function FormBuilderTest::testValueCallableIsSafe
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php \Drupal\Tests\Core\Form\FormBuilderTest::testValueCallableIsSafe()
- 8.9.x core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php \Drupal\Tests\Core\Form\FormBuilderTest::testValueCallableIsSafe()
- 10 core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php \Drupal\Tests\Core\Form\FormBuilderTest::testValueCallableIsSafe()
@covers ::valueCallableIsSafe
@dataProvider providerTestValueCallableIsSafe
File
-
core/
tests/ Drupal/ Tests/ Core/ Form/ FormBuilderTest.php, line 816
Class
- FormBuilderTest
- @coversDefaultClass \Drupal\Core\Form\FormBuilder @group Form
Namespace
Drupal\Tests\Core\FormCode
public function testValueCallableIsSafe($callback, $expected) : void {
$method = new \ReflectionMethod(FormBuilder::class, 'valueCallableIsSafe');
$is_safe = $method->invoke($this->formBuilder, $callback);
$this->assertSame($expected, $is_safe);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.