Commit e3f8efb8 authored by alexpott's avatar alexpott

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

parent 099e0fa7
......@@ -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.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment