You are here

public function ElementContext::assertBlockHasContextual in Lightning Core 8.5

Same name and namespace in other branches
  1. 8 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockHasContextual()
  2. 8.2 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockHasContextual()
  3. 8.3 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockHasContextual()
  4. 8.4 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockHasContextual()

Asserts that a block has contextual link(s).

@Then the :plugin_id block should have contextual links @Then the :plugin_id block should have a :link_class contextual link @Then I should see a :plugin_id block with contextual links @Then I should see a :plugin_id block with a :link_class contextual link

Parameters

string $plugin_id: The block plugin ID.

string $link_class: (optional) The CSS class of a specific contextual link.

See also

::assertContextualLinks()

::assertContextualLink()

::assertBlockExists()

File

tests/contexts/ElementContext.behat.inc, line 536

Class

ElementContext
Contains miscellaneous step definitions for working with HTML elements.

Namespace

Acquia\LightningExtension\Context

Code

public function assertBlockHasContextual($plugin_id, $link_class = NULL) {
  $element = $this
    ->assertBlockExists($plugin_id);
  return $link_class ? $this
    ->assertContextualLink($element, $link_class) : $this
    ->assertContextualLinks($element);
}