protected function AdminMenuWebTestCase::assertNoElementByXPath in Administration menu 7.3
Same name and namespace in other branches
- 6.3 tests/admin_menu.test \AdminMenuWebTestCase::assertNoElementByXPath()
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 AdminMenuWebTestCase::assertNoElementByXPath()
- AdminMenuPermissionsTestCase::testPermissions in tests/
admin_menu.test - Test that the links are added to the page (no JS testing).
- AdminMenuWebTestCase::assertNoLinkTrailByTitle in tests/
admin_menu.test - Asserts that no link appears in the menu for a specified trail.
File
- tests/
admin_menu.test, line 72 - Tests for the Administration menu module.
Class
- AdminMenuWebTestCase
- Base class for all administration menu web test cases.
Code
protected function assertNoElementByXPath($xpath, array $arguments = array(), $message, $group = 'Other') {
$elements = $this
->xpath($xpath, $arguments);
return $this
->assertTrue(empty($elements), $message, $group);
}