protected function AccessManagerTest::setupAccessChecker in Drupal 9
Same name and namespace in other branches
- 8 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 528 - Contains \Drupal\Tests\Core\Access\AccessManagerTest.
Class
- AccessManagerTest
- @coversDefaultClass \Drupal\Core\Access\AccessManager @group Access
Namespace
Drupal\Tests\Core\AccessCode
protected function setupAccessChecker() {
$this->container
->register('test_access_default', DefaultAccessCheck::class);
$this->checkProvider
->addCheckService('test_access_default', 'access', [
'_access',
]);
}