function CsrfTokenGeneratorTest::testInvalidParameterTypes
Tests CsrfTokenGenerator::validate() with invalid parameter types.
@legacy-covers ::validate
Attributes
#[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 180
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.