You are here

public function DoTrustedCallbackTraitTest::testSilencedDeprecation in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::testSilencedDeprecation()
  2. 9 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\DoTrustedCallbackTraitTest::testSilencedDeprecation()

@dataProvider errorTypeProvider @group legacy

File

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

Class

DoTrustedCallbackTraitTest
@coversDefaultClass \Drupal\Core\Security\DoTrustedCallbackTrait @group Security

Namespace

Drupal\Tests\Core\Security

Code

public function testSilencedDeprecation($callback) {
  $this
    ->expectDeprecation('Drupal\\Tests\\Core\\Security\\UntrustedObject::callback is not trusted');
  $this
    ->doTrustedCallback($callback, [], '%s is not trusted', TrustedCallbackInterface::TRIGGER_SILENCED_DEPRECATION);
}