function ContextualDynamicContextTest::assertNoContextualLinkPlaceHolder

Same name in other branches
  1. 9 core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php \Drupal\Tests\contextual\Functional\ContextualDynamicContextTest::assertNoContextualLinkPlaceHolder()
  2. 8.9.x core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php \Drupal\Tests\contextual\Functional\ContextualDynamicContextTest::assertNoContextualLinkPlaceHolder()
  3. 11.x core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php \Drupal\Tests\contextual\Functional\ContextualDynamicContextTest::assertNoContextualLinkPlaceHolder()

Asserts that a contextual link placeholder with the given id does not exist.

@internal

Parameters

string $id: A contextual link id.

1 call to ContextualDynamicContextTest::assertNoContextualLinkPlaceHolder()
ContextualDynamicContextTest::testDifferentPermissions in core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php
Tests contextual links with different permissions.

File

core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php, line 252

Class

ContextualDynamicContextTest
Tests contextual link display on the front page based on permissions.

Namespace

Drupal\Tests\contextual\Functional

Code

protected function assertNoContextualLinkPlaceHolder(string $id) : void {
    $this->assertSession()
        ->elementNotExists('css', 'div[data-contextual-id="' . $id . '"]');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.