public function RevisionUiAccessTest::overviewAccessProvider in Group 2.0.x
Same name and namespace in other branches
- 8 tests/src/Kernel/RevisionUiAccessTest.php \Drupal\Tests\group\Kernel\RevisionUiAccessTest::overviewAccessProvider()
Data provider for testOverviewAccess().
Return value
array A list of testOverviewAccess method arguments.
File
- tests/
src/ Kernel/ RevisionUiAccessTest.php, line 114
Class
- RevisionUiAccessTest
- Tests the revision UI access for groups.
Namespace
Drupal\Tests\group\KernelCode
public function overviewAccessProvider() {
$cases = [];
$cases['view-one-rev-no-new-rev'] = [
[
'view group',
],
[
'view group',
'view group revisions',
],
FALSE,
FALSE,
FALSE,
FALSE,
FALSE,
'Checking access to revision overview when there is one revision and new revisions are not created automatically',
];
$cases['view-one-rev-new-rev'] = [
[
'view group',
],
[
'view group',
'view group revisions',
],
FALSE,
TRUE,
TRUE,
TRUE,
FALSE,
'Checking access to revision overview when there is one revision and new revisions are created automatically',
];
$cases['view-multi-rev-no-new-rev'] = [
[
'view group',
],
[
'view group',
'view group revisions',
],
FALSE,
TRUE,
TRUE,
FALSE,
TRUE,
'Checking access to revision overview when there are multiple revisions and new revisions are not created automatically',
];
$cases['view-multi-rev-new-rev'] = [
[
'view group',
],
[
'view group',
'view group revisions',
],
FALSE,
TRUE,
TRUE,
TRUE,
TRUE,
'Checking access to revision overview when there are multiple revisions and new revisions are created automatically',
];
$cases['no-view-one-rev-new-rev'] = [
[],
[
'view group revisions',
],
FALSE,
FALSE,
TRUE,
TRUE,
FALSE,
'Checking access to revision overview when there is one revision and new revisions are created automatically, but the user has no view access',
];
$cases['no-view-multi-rev-new-rev'] = [
[],
[
'view group revisions',
],
FALSE,
FALSE,
TRUE,
TRUE,
TRUE,
'Checking access to revision overview when there are multiple revisions and new revisions are created automatically, but the user has no view access',
];
return $cases;
}