You are here

protected function BigMenuUiTest::assertLinkNotExists in Big Menu 2.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/BigMenuUiTest.php \Drupal\Tests\bigmenu\Functional\BigMenuUiTest::assertLinkNotExists()

Assert a link doesn't exist, scoped to a container.

Parameters

string $container: The container selector.

string $label: The exact label of the link.

1 call to BigMenuUiTest::assertLinkNotExists()
BigMenuUiTest::testBigMenuUi in tests/src/Functional/BigMenuUiTest.php
Tests the Big Menu interface.

File

tests/src/Functional/BigMenuUiTest.php, line 179

Class

BigMenuUiTest
Tests the Big Menu interface.

Namespace

Drupal\Tests\bigmenu\Functional

Code

protected function assertLinkNotExists($container, $label) {
  $links = $this
    ->getSession()
    ->getPage()
    ->find('css', $container)
    ->findAll('named_exact', [
    'link',
    $label,
  ]);
  $this
    ->assertEmpty($links);
}