protected function ContextualDynamicContextTest::createContextualIdToken in Drupal 9
Same name and namespace in other branches
- 8 core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php \Drupal\Tests\contextual\Functional\ContextualDynamicContextTest::createContextualIdToken()
Creates a contextual ID token.
Parameters
string $id: The contextual ID to create a token for.
Return value
string The contextual ID token.
2 calls to ContextualDynamicContextTest::createContextualIdToken()
- ContextualDynamicContextTest::assertContextualLinkPlaceHolder in core/
modules/ contextual/ tests/ src/ Functional/ ContextualDynamicContextTest.php - Asserts that a contextual link placeholder with the given id exists.
- ContextualDynamicContextTest::testTokenProtection in core/
modules/ contextual/ tests/ src/ Functional/ ContextualDynamicContextTest.php - Tests the contextual placeholder content is protected by a token.
File
- core/
modules/ contextual/ tests/ src/ Functional/ ContextualDynamicContextTest.php, line 282
Class
- ContextualDynamicContextTest
- Tests if contextual links are showing on the front page depending on permissions.
Namespace
Drupal\Tests\contextual\FunctionalCode
protected function createContextualIdToken($id) {
return Crypt::hmacBase64($id, Settings::getHashSalt() . $this->container
->get('private_key')
->get());
}