protected function AdminMenuTestBase::assertNoElementByXPath in Administration menu 8.3
Check that an element does not exist in HTML markup.
Parameters
$xpath: An XPath expression.
array $arguments: (optional) An associative array of XPath replacement tokens to pass to DrupalWebTestCase::buildXPathQuery().
$message: The message to display along with the assertion.
$group: The type of assertion - examples are "Browser", "PHP".
Return value
TRUE if the assertion succeeded, FALSE otherwise.
2 calls to AdminMenuTestBase::assertNoElementByXPath()
- AdminMenuPermissionsTest::testPermissions in lib/
Drupal/ admin_menu/ Tests/ AdminMenuPermissionsTest.php - Test that the links are added to the page (no JS testing).
- AdminMenuTestBase::assertNoLinkTrailByTitle in lib/
Drupal/ admin_menu/ Tests/ AdminMenuTestBase.php - Asserts that no link appears in the menu for a specified trail.
File
- lib/
Drupal/ admin_menu/ Tests/ AdminMenuTestBase.php, line 67
Class
- AdminMenuTestBase
- Base class for all administration menu web test cases.
Namespace
Drupal\admin_menu\TestsCode
protected function assertNoElementByXPath($xpath, array $arguments = [], $message, $group = 'Other') {
$elements = $this
->xpath($xpath, $arguments);
return $this
->assertTrue(empty($elements), $message, $group);
}