public function DoTrustedCallbackTraitTest::providerTestUntrustedCallbacks in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::providerTestUntrustedCallbacks()
- 9 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::providerTestUntrustedCallbacks()
Data provider for ::testUntrustedCallbacks().
File
- core/
tests/ Drupal/ Tests/ Core/ Security/ DoTrustedCallbackTraitTest.php, line 56
Class
- DoTrustedCallbackTraitTest
- @coversDefaultClass \Drupal\Core\Security\DoTrustedCallbackTrait @group Security
Namespace
Drupal\Tests\Core\SecurityCode
public function providerTestUntrustedCallbacks() {
$tests['TrustedCallbackInterface_object'] = [
[
new TrustedMethods(),
'unTrustedCallback',
],
TrustedInterface::class,
];
$tests['TrustedCallbackInterface_static_string'] = [
'\\Drupal\\Tests\\Core\\Security\\TrustedMethods::unTrustedCallback',
TrustedInterface::class,
];
$tests['TrustedCallbackInterface_static_array'] = [
[
TrustedMethods::class,
'unTrustedCallback',
],
TrustedInterface::class,
];
$tests['untrusted_object'] = [
[
new UntrustedObject(),
'callback',
],
TrustedInterface::class,
];
$tests['untrusted_object_static_string'] = [
'\\Drupal\\Tests\\Core\\Security\\UntrustedObject::callback',
TrustedInterface::class,
];
$tests['untrusted_object_static_array'] = [
[
UntrustedObject::class,
'callback',
],
TrustedInterface::class,
];
$tests['invokable_untrusted_object_static_array'] = [
new InvokableUntrustedObject(),
TrustedInterface::class,
];
return $tests;
}