function MenuWebTestCase::getParts
Returns the breadcrumb contents of the current page in the internal browser.
1 call to MenuWebTestCase::getParts()
- MenuWebTestCase::assertBreadcrumb in modules/
simpletest/ tests/ menu.test - Assert that a given path shows certain breadcrumb links.
File
-
modules/
simpletest/ tests/ menu.test, line 108
Class
- MenuWebTestCase
- @file Provides SimpleTests for menu.inc.
Code
protected function getParts() {
$parts = array();
$elements = $this->xpath('//div[@class="breadcrumb"]/a');
if (!empty($elements)) {
foreach ($elements as $element) {
$parts[] = array(
'text' => (string) $element,
'href' => (string) $element['href'],
'title' => (string) $element['title'],
);
}
}
return $parts;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.