Skip to content
Snippets Groups Projects
Commit e3f8efb8 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2321809 by undertext, JeroenT | dawehner: Put the access manager onto \Drupal.

parent 099e0fa7
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -675,4 +675,14 @@ public static function pathValidator() {
return static::$container->get('path.validator');
}
/**
* Returns the access manager service.
*
* @return \Drupal\Core\Access\AccessManagerInterface
* The access manager service.
*/
public static function accessManager() {
return static::$container->get('access_manager');
}
}
......@@ -335,6 +335,14 @@ public function testPathValidator() {
$this->assertNotNull(\Drupal::pathValidator());
}
/**
* Tests the accessManager() method.
*/
public function testAccessManager() {
$this->setMockContainerService('access_manager');
$this->assertNotNull(\Drupal::accessManager());
}
/**
* Sets up a mock expectation for the container get() method.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment