function ContextualDynamicContextTest::assertContextualLinkPlaceHolder
Same name in other branches
- 9 core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php \Drupal\Tests\contextual\Functional\ContextualDynamicContextTest::assertContextualLinkPlaceHolder()
- 8.9.x core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php \Drupal\Tests\contextual\Functional\ContextualDynamicContextTest::assertContextualLinkPlaceHolder()
- 11.x core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php \Drupal\Tests\contextual\Functional\ContextualDynamicContextTest::assertContextualLinkPlaceHolder()
Asserts that a contextual link placeholder with the given id exists.
@internal
Parameters
string $id: A contextual link id.
2 calls to ContextualDynamicContextTest::assertContextualLinkPlaceHolder()
- ContextualDynamicContextTest::testDifferentPermissions in core/
modules/ contextual/ tests/ src/ Functional/ ContextualDynamicContextTest.php - Tests contextual links with different permissions.
- 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 235
Class
- ContextualDynamicContextTest
- Tests contextual link display on the front page based on permissions.
Namespace
Drupal\Tests\contextual\FunctionalCode
protected function assertContextualLinkPlaceHolder(string $id) : void {
$this->assertSession()
->elementAttributeContains('css', 'div[data-contextual-id="' . $id . '"]', 'data-contextual-token', $this->createContextualIdToken($id));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.