Test \Drupal\Core\Access\AccessManager::check() with conjunctions.
@dataProvider providerTestCheckConjunctions
public function testCheckConjunctions($conjunction, $name, $condition_one, $condition_two, $expected_access) {
$this
->setupAccessChecker();
$access_check = new DefinedTestAccessCheck();
$this->container
->register('test_access_defined', $access_check);
$this->accessManager
->addCheckService('test_access_defined');
$request = new Request();
$route_collection = new RouteCollection();
// Setup a test route for each access configuration.
$requirements = array(
'_access' => static::convertAccessCheckInterfaceToString($condition_one),
'_test_access' => static::convertAccessCheckInterfaceToString($condition_two),
);
$options = array(
'_access_mode' => $conjunction,
);
$route = new Route($name, array(), $requirements, $options);
$route_collection
->add($name, $route);
$this->accessManager
->setChecks($route_collection);
$this
->assertSame($this->accessManager
->check($route, $request), $expected_access);
}