function DoTrustedCallbackTraitTest::providerTestException

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::providerTestException()

Data provider for testException().

File

core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php, line 191

Class

DoTrustedCallbackTraitTest
Tests Drupal\Core\Security\DoTrustedCallbackTrait.

Namespace

Drupal\Tests\Core\Security

Code

public static function providerTestException() : array {
  $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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.