You are here

public function CsrfTokenGeneratorTest::testInvalidParameterTypes in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 @expectedException InvalidArgumentException

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 181
Contains \Drupal\Tests\Core\Access\CsrfTokenGeneratorTest.

Class

CsrfTokenGeneratorTest
Tests the CsrfTokenGenerator class.

Namespace

Drupal\Tests\Core\Access

Code

public function testInvalidParameterTypes($token, $value = '') {
  $this
    ->setupDefaultExpectations();
  $this->generator
    ->validate($token, $value);
}