public function SchedulerPermissionsTest::dataPermissionsTest in Scheduler 2.x
Provides data for testUserPermissionsAdd() and testUserPermissionsEdit()
The data in dataStandardEntityTypes() is expanded to test each entity type with users who only have scheduler permission on one entity type and no permission for the other entity types.
Return value
array Each array item has the values: [entity type id, bundle id, user name].
File
- tests/
src/ Functional/ SchedulerPermissionsTest.php, line 191
Class
- SchedulerPermissionsTest
- Tests some permissions of the Scheduler module.
Namespace
Drupal\Tests\scheduler\FunctionalCode
public function dataPermissionsTest() {
$data = [];
foreach ($this
->dataStandardEntityTypes() as $key => $values) {
$data["{$key}-1"] = array_merge($values, [
'nodeUser',
]);
$data["{$key}-2"] = array_merge($values, [
'mediaUser',
]);
$data["{$key}-3"] = array_merge($values, [
'commerce_productUser',
]);
}
return $data;
}