function Breadcrumb404Test::getBreadcrumbCacheEntries

Same name in other branches
  1. 8.9.x core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php \Drupal\FunctionalTests\Breadcrumb\Breadcrumb404Test::getBreadcrumbCacheEntries()
  2. 10 core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php \Drupal\FunctionalTests\Breadcrumb\Breadcrumb404Test::getBreadcrumbCacheEntries()
  3. 11.x core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php \Drupal\FunctionalTests\Breadcrumb\Breadcrumb404Test::getBreadcrumbCacheEntries()

Gets the breadcrumb cache entries.

Return value

array The breadcrumb cache entries.

1 call to Breadcrumb404Test::getBreadcrumbCacheEntries()
Breadcrumb404Test::testBreadcrumbOn404Pages in core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php
Tests that different 404s don't create unnecessary cache entries.

File

core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php, line 52

Class

Breadcrumb404Test
Tests the breadcrumb of 404 pages.

Namespace

Drupal\FunctionalTests\Breadcrumb

Code

protected function getBreadcrumbCacheEntries() {
    $database = \Drupal::database();
    $cache_entries = $database->select('cache_render')
        ->fields('cache_render')
        ->condition('cid', $database->escapeLike('entity_view:block:breadcrumb') . '%', 'LIKE')
        ->execute()
        ->fetchAllAssoc('cid');
    return $cache_entries;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.