public function UncacheableEntityPermissionProviderTest::testBuildPermissions in Entity API 8
@covers ::buildPermissions
@dataProvider entityTypeProvider
File
- tests/
src/ Unit/ UncacheableEntityPermissionProviderTest.php, line 52
Class
- UncacheableEntityPermissionProviderTest
- @coversDefaultClass \Drupal\entity\UncacheableEntityPermissionProvider @group entity
Namespace
Drupal\Tests\entity\UnitCode
public function testBuildPermissions(EntityTypeInterface $entity_type, array $expected_permissions) {
$permissions = $this->permissionProvider
->buildPermissions($entity_type);
$this
->assertEquals(array_keys($expected_permissions), array_keys($permissions));
foreach ($permissions as $name => $permission) {
$this
->assertEquals('entity_module_test', $permission['provider']);
$this
->assertEquals($expected_permissions[$name], $permission['title']);
}
}