public function DoTrustedCallbackTraitTest::errorTypeProvider in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::errorTypeProvider()
- 9 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::errorTypeProvider()
Data provider for tests of ::doTrustedCallback $error_type argument.
File
- core/
tests/ Drupal/ Tests/ Core/ Security/ DoTrustedCallbackTraitTest.php, line 97
Class
- DoTrustedCallbackTraitTest
- @coversDefaultClass \Drupal\Core\Security\DoTrustedCallbackTrait @group Security
Namespace
Drupal\Tests\Core\SecurityCode
public function errorTypeProvider() {
$tests['untrusted_object'] = [
[
new UntrustedObject(),
'callback',
],
];
$tests['untrusted_object_static_string'] = [
'Drupal\\Tests\\Core\\Security\\UntrustedObject::callback',
];
$tests['untrusted_object_static_array'] = [
[
UntrustedObject::class,
'callback',
],
];
return $tests;
}