public function DoTrustedCallbackTraitTest::testException in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::testException()
- 9 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::testException()
@dataProvider errorTypeProvider
File
- core/
tests/ Drupal/ Tests/ Core/ Security/ DoTrustedCallbackTraitTest.php, line 70
Class
- DoTrustedCallbackTraitTest
- @coversDefaultClass \Drupal\Core\Security\DoTrustedCallbackTrait @group Security
Namespace
Drupal\Tests\Core\SecurityCode
public function testException($callback) {
$this
->expectException(UntrustedCallbackException::class);
$this
->expectExceptionMessage('Drupal\\Tests\\Core\\Security\\UntrustedObject::callback is not trusted');
$this
->doTrustedCallback($callback, [], '%s is not trusted');
}