function DoTrustedCallbackTraitTest::providerTestUntrustedCallbacks
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::providerTestUntrustedCallbacks()
- 10 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::providerTestUntrustedCallbacks()
- 11.x 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 57
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.