1 menu.test protected MenuWebTestCase::getParts()

Returns the breadcrumb contents of the current page in the internal browser.

File

core/modules/simpletest/tests/menu.test, line 107
Provides SimpleTests for menu.inc.

Class

MenuWebTestCase

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;
}