protected function AdminToolbarToolsSortTest::assertMenuDoesNotHaveHref in Admin Toolbar 3.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/AdminToolbarToolsSortTest.php \Drupal\Tests\admin_toolbar\Functional\AdminToolbarToolsSortTest::assertMenuDoesNotHaveHref()
Checks that there is no link with the specified url in the admin toolbar.
Parameters
string $url: The url to assert exists in the admin menu.
Throws
\Behat\Mink\Exception\ExpectationException
1 call to AdminToolbarToolsSortTest::assertMenuDoesNotHaveHref()
- AdminToolbarToolsSortTest::testMenuUpdate in tests/
src/ Functional/ AdminToolbarToolsSortTest.php - Tests that menu updates on entity add/update/delete.
File
- tests/
src/ Functional/ AdminToolbarToolsSortTest.php, line 249
Class
- AdminToolbarToolsSortTest
- Tests Admin Toolbar tools functionality.
Namespace
Drupal\Tests\admin_toolbar\FunctionalCode
protected function assertMenuDoesNotHaveHref($url) {
$this
->assertSession()
->elementNotExists('xpath', '//div[@id="toolbar-item-administration-tray"]//a[contains(@href, "' . $url . '")]');
}