diff --git a/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php index 2561c55..f171580 100644 --- a/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php +++ b/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php @@ -70,14 +70,32 @@ protected function getTestRouteCollection() { '_role' => 'role_test_1+role_test_2', ) )); + // Ensure that trimming the values works on "OR" conjunctions. $route_collection->add('role_test_4', new Route('/role_test_4', array( '_controller' => '\Drupal\router_test\TestControllers::test1', ), array( + '_role' => 'role_test_1 + role_test_2', + ) + )); + $route_collection->add('role_test_5', new Route('/role_test_5', + array( + '_controller' => '\Drupal\router_test\TestControllers::test1', + ), + array( '_role' => 'role_test_1,role_test_2', ) )); + // Ensure that trimming the values works on "AND" conjunctions. + $route_collection->add('role_test_6', new Route('/role_test_6', + array( + '_controller' => '\Drupal\router_test\TestControllers::test1', + ), + array( + '_role' => 'role_test_1 , role_test_2', + ) + )); return $route_collection; } @@ -111,7 +129,9 @@ public function roleAccessProvider() { array('role_test_1', array($account_1, $account_12), array($account_2, $account_none)), array('role_test_2', array($account_2, $account_12), array($account_1, $account_none)), array('role_test_3', array($account_12), array($account_1, $account_2, $account_none)), - array('role_test_4', array($account_1, $account_2, $account_12), array()), + array('role_test_4', array($account_12), array($account_1, $account_2, $account_none)), + array('role_test_5', array($account_1, $account_2, $account_12), array()), + array('role_test_6', array($account_1, $account_2, $account_12), array()), ); }