function CsrfTokenGeneratorTest::testInvalidParameterTypes
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php \Drupal\Tests\Core\Access\CsrfTokenGeneratorTest::testInvalidParameterTypes()
- 8.9.x core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php \Drupal\Tests\Core\Access\CsrfTokenGeneratorTest::testInvalidParameterTypes()
- 10 core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php \Drupal\Tests\Core\Access\CsrfTokenGeneratorTest::testInvalidParameterTypes()
Tests CsrfTokenGenerator::validate() with invalid parameter types.
@covers ::validate @dataProvider providerTestInvalidParameterTypes
Parameters
mixed $token: The token to be validated.
mixed $value: (optional) An additional value to base the token on.
File
-
core/
tests/ Drupal/ Tests/ Core/ Access/ CsrfTokenGeneratorTest.php, line 179
Class
- CsrfTokenGeneratorTest
- Tests the CsrfTokenGenerator class.
Namespace
Drupal\Tests\Core\AccessCode
public function testInvalidParameterTypes($token, $value = '') : void {
$this->setupDefaultExpectations();
$this->expectException(\InvalidArgumentException::class);
$this->generator
->validate($token, $value);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.