protected function BigMenuUiTest::assertLinkExists in Big Menu 8
Same name and namespace in other branches
- 2.x tests/src/Functional/BigMenuUiTest.php \Drupal\Tests\bigmenu\Functional\BigMenuUiTest::assertLinkExists()
Assert a link exist, scoped to a container.
Parameters
string $container: The container selector.
string $label: The exact label of the link.
1 call to BigMenuUiTest::assertLinkExists()
- BigMenuUiTest::testBigMenuUi in tests/
src/ Functional/ BigMenuUiTest.php - Tests the Big Menu interface.
File
- tests/
src/ Functional/ BigMenuUiTest.php, line 154
Class
- BigMenuUiTest
- Tests the Big Menu interface.
Namespace
Drupal\Tests\bigmenu\FunctionalCode
protected function assertLinkExists($container, $label) {
$links = $this
->getSession()
->getPage()
->find('css', $container)
->findAll('named_exact', [
'link',
$label,
]);
$this
->assert(!empty($links));
}