public function DoTrustedCallbackTraitTest::testTrustedCallbacks in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::testTrustedCallbacks()
- 9 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::testTrustedCallbacks()
@covers ::doTrustedCallback @dataProvider providerTestTrustedCallbacks
File
- core/
tests/ Drupal/ Tests/ Core/ Security/ DoTrustedCallbackTraitTest.php, line 21
Class
- DoTrustedCallbackTraitTest
- @coversDefaultClass \Drupal\Core\Security\DoTrustedCallbackTrait @group Security
Namespace
Drupal\Tests\Core\SecurityCode
public function testTrustedCallbacks(callable $callback, $extra_trusted_interface = NULL) {
$return = $this
->doTrustedCallback($callback, [], '%s is not trusted', TrustedCallbackInterface::THROW_EXCEPTION, $extra_trusted_interface);
$this
->assertSame('test', $return);
}