You are here

protected function MenuWebTestCase::getParts in Drupal 7

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
Provides SimpleTests for menu.inc.

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