You are here

public function MetadataBagTest::testDeprecatedClearCsrfTokenSeed in Drupal 9

@covers ::clearCsrfTokenSeed @group legacy

File

core/tests/Drupal/Tests/Core/Session/MetadataBagTest.php, line 29

Class

MetadataBagTest
@coversDefaultClass \Drupal\Core\Session\MetadataBag @group Session

Namespace

Drupal\Tests\Core\Session

Code

public function testDeprecatedClearCsrfTokenSeed() {
  $this
    ->expectDeprecation('Calling Drupal\\Core\\Session\\MetadataBag::clearCsrfTokenSeed() is deprecated in drupal:9.2.0 and will be removed in drupal:10.0.0. Use \\Drupal\\Core\\Session\\MetadataBag::stampNew() instead. See https://www.drupal.org/node/3187914');
  $metadata = new MetadataBag(new Settings([]));
  $metadata
    ->clearCsrfTokenSeed();
}