public function FormStateDecoratorBaseTest::providerPrepareCallback in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php \Drupal\Tests\Core\Form\FormStateDecoratorBaseTest::providerPrepareCallback()
Provides data to self::testPrepareCallback().
File
- core/
tests/ Drupal/ Tests/ Core/ Form/ FormStateDecoratorBaseTest.php, line 1454
Class
- FormStateDecoratorBaseTest
- @coversDefaultClass \Drupal\Core\Form\FormStateDecoratorBase
Namespace
Drupal\Tests\Core\FormCode
public function providerPrepareCallback() {
$function = 'sleep';
$shorthand_form_method = '::submit()';
$closure = function () {
};
$static_method_string = __METHOD__;
$static_method_array = [
__CLASS__,
__FUNCTION__,
];
$object_method_array = [
$this,
__FUNCTION__,
];
return [
// A shorthand form method is generally expanded to become a method on an
// object.
[
$shorthand_form_method,
$object_method_array,
],
// Functions, closures, and static method calls generally remain the same.
[
$function,
$function,
],
[
$closure,
$closure,
],
[
$static_method_string,
$static_method_string,
],
[
$static_method_array,
$static_method_array,
],
];
}