You are here

protected function ContextualDynamicContextTest::assertContextualLinkPlaceHolder in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/contextual/src/Tests/ContextualDynamicContextTest.php \Drupal\contextual\Tests\ContextualDynamicContextTest::assertContextualLinkPlaceHolder()

Asserts that a contextual link placeholder with the given id exists.

Parameters

string $id: A contextual link id.

Return value

bool The result of the assertion.

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

File

core/modules/contextual/src/Tests/ContextualDynamicContextTest.php, line 157
Contains \Drupal\contextual\Tests\ContextualDynamicContextTest.

Class

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

Namespace

Drupal\contextual\Tests

Code

protected function assertContextualLinkPlaceHolder($id) {
  return $this
    ->assertRaw('<div' . new Attribute(array(
    'data-contextual-id' => $id,
  )) . '></div>', format_string('Contextual link placeholder with id @id exists.', array(
    '@id' => $id,
  )));
}