protected function MenuTestBase::getParts

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

1 call to MenuTestBase::getParts()
MenuTestBase::assertBreadcrumb in drupal/core/modules/system/lib/Drupal/system/Tests/Menu/MenuTestBase.php
Assert that a given path shows certain breadcrumb links.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Menu/MenuTestBase.php, line 105
Definition of Drupal\system\Tests\Menu\MenuTestBase.

Class

MenuTestBase

Namespace

Drupal\system\Tests\Menu

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