function DoTrustedCallbackTraitTest::testException
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::testException()
- 8.9.x core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::testException()
- 11.x 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 75
Class
- DoTrustedCallbackTraitTest
- @coversDefaultClass \Drupal\Core\Security\DoTrustedCallbackTrait @group Security
Namespace
Drupal\Tests\Core\SecurityCode
public function testException($callback) : void {
$this->expectException(UntrustedCallbackException::class);
$this->expectExceptionMessage('Drupal\\Tests\\Core\\Security\\UntrustedObject::callback is not trusted');
$this->doTrustedCallback($callback, [], '%s is not trusted');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.