public function CsrfTokenGeneratorTest::testInvalidParameterTypes in Drupal 8
Same name and namespace in other branches
- 9 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 177
Class
- CsrfTokenGeneratorTest
- Tests the CsrfTokenGenerator class.
Namespace
Drupal\Tests\Core\AccessCode
public function testInvalidParameterTypes($token, $value = '') {
$this
->setupDefaultExpectations();
$this
->expectException(\InvalidArgumentException::class);
$this->generator
->validate($token, $value);
}