public function AccessManagerTest::providerTestCheckConjunctions

Provides data for the conjunction test.

Return value

array An array of data for check conjunctions.

See also

\Drupal\Tests\Core\Access\AccessManagerTest::testCheckConjunctions()

File

drupal/core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php, line 127
Contains \Drupal\Tests\Core\Access\AccessManagerTest.

Class

AccessManagerTest
Tests the access manager.

Namespace

Drupal\Tests\Core\Access

Code

public function providerTestCheckConjunctions() {
  $access_configurations = array();
  $access_configurations[] = array(
    'conjunction' => 'ALL',
    'name' => 'test_route_4',
    'condition_one' => AccessCheckInterface::ALLOW,
    'condition_two' => AccessCheckInterface::KILL,
    'expected' => FALSE,
  );
  $access_configurations[] = array(
    'conjunction' => 'ALL',
    'name' => 'test_route_5',
    'condition_one' => AccessCheckInterface::ALLOW,
    'condition_two' => AccessCheckInterface::DENY,
    'expected' => FALSE,
  );
  $access_configurations[] = array(
    'conjunction' => 'ALL',
    'name' => 'test_route_6',
    'condition_one' => AccessCheckInterface::KILL,
    'condition_two' => AccessCheckInterface::DENY,
    'expected' => FALSE,
  );
  $access_configurations[] = array(
    'conjunction' => 'ALL',
    'name' => 'test_route_7',
    'condition_one' => AccessCheckInterface::ALLOW,
    'condition_two' => AccessCheckInterface::ALLOW,
    'expected' => TRUE,
  );
  $access_configurations[] = array(
    'conjunction' => 'ALL',
    'name' => 'test_route_8',
    'condition_one' => AccessCheckInterface::KILL,
    'condition_two' => AccessCheckInterface::KILL,
    'expected' => FALSE,
  );
  $access_configurations[] = array(
    'conjunction' => 'ALL',
    'name' => 'test_route_9',
    'condition_one' => AccessCheckInterface::DENY,
    'condition_two' => AccessCheckInterface::DENY,
    'expected' => FALSE,
  );
  $access_configurations[] = array(
    'conjunction' => 'ANY',
    'name' => 'test_route_10',
    'condition_one' => AccessCheckInterface::ALLOW,
    'condition_two' => AccessCheckInterface::KILL,
    'expected' => FALSE,
  );
  $access_configurations[] = array(
    'conjunction' => 'ANY',
    'name' => 'test_route_11',
    'condition_one' => AccessCheckInterface::ALLOW,
    'condition_two' => AccessCheckInterface::DENY,
    'expected' => TRUE,
  );
  $access_configurations[] = array(
    'conjunction' => 'ANY',
    'name' => 'test_route_12',
    'condition_one' => AccessCheckInterface::KILL,
    'condition_two' => AccessCheckInterface::DENY,
    'expected' => FALSE,
  );
  $access_configurations[] = array(
    'conjunction' => 'ANY',
    'name' => 'test_route_13',
    'condition_one' => AccessCheckInterface::ALLOW,
    'condition_two' => AccessCheckInterface::ALLOW,
    'expected' => TRUE,
  );
  $access_configurations[] = array(
    'conjunction' => 'ANY',
    'name' => 'test_route_14',
    'condition_one' => AccessCheckInterface::KILL,
    'condition_two' => AccessCheckInterface::KILL,
    'expected' => FALSE,
  );
  $access_configurations[] = array(
    'conjunction' => 'ANY',
    'name' => 'test_route_15',
    'condition_one' => AccessCheckInterface::DENY,
    'condition_two' => AccessCheckInterface::DENY,
    'expected' => FALSE,
  );
  return $access_configurations;
}