1 menu.test | protected MenuWebTestCase::getParts() |
Returns the breadcrumb contents of the current page in the internal browser.
File
Class
Code
protected function getParts() {
$parts = array();
$elements = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a');
if (!empty($elements)) {
foreach ($elements as $element) {
$parts[] = array(
'text' => (string) $element,
'href' => (string) $element['href'],
'title' => (string) $element['title'],
);
}
}
return $parts;
}