public function MetadataBagTest::testStampNew in Drupal 9
@covers ::stampNew
File
- core/
tests/ Drupal/ Tests/ Core/ Session/ MetadataBagTest.php, line 18
Class
- MetadataBagTest
- @coversDefaultClass \Drupal\Core\Session\MetadataBag @group Session
Namespace
Drupal\Tests\Core\SessionCode
public function testStampNew() {
$metadata = new MetadataBag(new Settings([]));
$metadata
->setCsrfTokenSeed('a_cryptographically_secure_long_random_string_should_used_here');
$metadata
->stampNew();
$this
->assertNotEquals('a_cryptographically_secure_long_random_string_should_used_here', $metadata
->getCsrfTokenSeed());
}