function MetadataBagTest::testStampNew
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Session/MetadataBagTest.php \Drupal\Tests\Core\Session\MetadataBagTest::testStampNew()
- 11.x core/tests/Drupal/Tests/Core/Session/MetadataBagTest.php \Drupal\Tests\Core\Session\MetadataBagTest::testStampNew()
@covers ::stampNew
File
-
core/
tests/ Drupal/ Tests/ Core/ Session/ MetadataBagTest.php, line 20
Class
- MetadataBagTest
- @coversDefaultClass \Drupal\Core\Session\MetadataBag @group Session
Namespace
Drupal\Tests\Core\SessionCode
public function testStampNew() : void {
$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());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.