function PathBasedBreadcrumbBuilderTest::setupAccessManagerToAllow

Same name in other branches
  1. 9 core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php \Drupal\Tests\system\Unit\Breadcrumbs\PathBasedBreadcrumbBuilderTest::setupAccessManagerToAllow()
  2. 8.9.x core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php \Drupal\Tests\system\Unit\Breadcrumbs\PathBasedBreadcrumbBuilderTest::setupAccessManagerToAllow()
  3. 11.x 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 394

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

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