You are here

protected function ContextualDynamicContextTest::assertContextualLinkPlaceHolder in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php \Drupal\Tests\contextual\Functional\ContextualDynamicContextTest::assertContextualLinkPlaceHolder()
  2. 10 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.

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 226

Class

ContextualDynamicContextTest
Tests if contextual links are showing on the front page depending on permissions.

Namespace

Drupal\Tests\contextual\Functional

Code

protected function assertContextualLinkPlaceHolder($id) {
  $this
    ->assertSession()
    ->elementAttributeContains('css', 'div[data-contextual-id="' . $id . '"]', 'data-contextual-token', $this
    ->createContextualIdToken($id));
}