You are here

public function PathBasedBreadcrumbBuilderTest::setupAccessManagerToAllow in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php \Drupal\Tests\system\Unit\Breadcrumbs\PathBasedBreadcrumbBuilderTest::setupAccessManagerToAllow()

Setup the access manager to always allow access to routes.

2 calls to PathBasedBreadcrumbBuilderTest::setupAccessManagerToAllow()
PathBasedBreadcrumbBuilderTest::testBuildWithTwoPathElements in core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php
Tests the build method with two path elements.
PathBasedBreadcrumbBuilderTest::testBuildWithUserPath in core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php
Tests the breadcrumb for a user path.

File

core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php, line 397
Contains \Drupal\Tests\system\Unit\Breadcrumbs\PathBasedBreadcrumbBuilderTest.

Class

PathBasedBreadcrumbBuilderTest
@coversDefaultClass \Drupal\system\PathBasedBreadcrumbBuilder @group system

Namespace

Drupal\Tests\system\Unit\Breadcrumbs

Code

public function setupAccessManagerToAllow() {
  $this->accessManager
    ->expects($this
    ->any())
    ->method('check')
    ->willReturn((new AccessResultAllowed())
    ->cachePerPermissions());
}