You are here

public function DoTrustedCallbackTraitTest::errorTypeProvider in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::errorTypeProvider()
  2. 10 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\Security

Code

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;
}