protected function BundlePermissionHandlerTraitTest::buildPermissions in Drupal 9
File
- core/
tests/ Drupal/ KernelTests/ Core/ Entity/ BundlePermissionHandlerTraitTest.php, line 67
Class
- BundlePermissionHandlerTraitTest
- @coversDefaultClass \Drupal\Core\Entity\BundlePermissionHandlerTrait
Namespace
Drupal\KernelTests\Core\EntityCode
protected function buildPermissions(EntityInterface $bundle) : array {
return [
"create {$bundle->id()}" => [
'title' => 'Create',
],
"edit {$bundle->id()}" => [
'title' => 'Edit',
// Ensure it is possible for buildPermissions to add additional
// dependencies.
'dependencies' => [
'config' => [
"test_module.entity.{$bundle->id()}",
],
'module' => [
'test_module',
],
],
],
];
}