public function CsrfTokenGeneratorTest::testGet in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php \Drupal\Tests\Core\Access\CsrfTokenGeneratorTest::testGet()
- 9 core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php \Drupal\Tests\Core\Access\CsrfTokenGeneratorTest::testGet()
Tests CsrfTokenGenerator::get().
@covers ::get
File
- core/
tests/ Drupal/ Tests/ Core/ Access/ CsrfTokenGeneratorTest.php, line 83
Class
- CsrfTokenGeneratorTest
- Tests the CsrfTokenGenerator class.
Namespace
Drupal\Tests\Core\AccessCode
public function testGet() {
$this
->setupDefaultExpectations();
$this
->assertIsString($this->generator
->get());
$this
->assertNotSame($this->generator
->get(), $this->generator
->get($this
->randomMachineName()));
$this
->assertNotSame($this->generator
->get($this
->randomMachineName()), $this->generator
->get($this
->randomMachineName()));
}