function AccessManagerTest::setupAccessChecker
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php \Drupal\Tests\Core\Access\AccessManagerTest::setupAccessChecker()
- 8.9.x core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php \Drupal\Tests\Core\Access\AccessManagerTest::setupAccessChecker()
- 10 core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php \Drupal\Tests\Core\Access\AccessManagerTest::setupAccessChecker()
Adds a default access check service to the container and the access manager.
6 calls to AccessManagerTest::setupAccessChecker()
- AccessManagerTest::testCheck in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessManagerTest.php - Tests \Drupal\Core\Access\AccessManager::check().
- AccessManagerTest::testCheckConjunctions in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessManagerTest.php - Tests \Drupal\Core\Access\AccessManager::check() with conjunctions.
- AccessManagerTest::testCheckNamedRoute in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessManagerTest.php - Tests the checkNamedRoute method.
- AccessManagerTest::testCheckNamedRouteWithNonExistingRoute in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessManagerTest.php - Tests checkNamedRoute given an invalid/non existing route name.
- AccessManagerTest::testCheckWithNullAccount in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessManagerTest.php - Tests \Drupal\Core\Access\AccessManager::check() with no account specified.
File
-
core/
tests/ Drupal/ Tests/ Core/ Access/ AccessManagerTest.php, line 522
Class
- AccessManagerTest
- @coversDefaultClass \Drupal\Core\Access\AccessManager @group Access
Namespace
Drupal\Tests\Core\AccessCode
protected function setupAccessChecker() : void {
$this->container
->register('test_access_default', DefaultAccessCheck::class);
$this->checkProvider
->addCheckService('test_access_default', 'access', [
'_access',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.