You are here

protected function PermissionsGeneratorTest::assertGlobalPermissions in Entity Construction Kit (ECK) 8

Asserts that the correct global permissions are returned.

3 calls to PermissionsGeneratorTest::assertGlobalPermissions()
PermissionsGeneratorTest::givenMultipleEntityTypesWithMixedSettingsGeneratesCorrectPermissions in tests/src/Unit/PermissionsGeneratorTest.php
Tests permission creation for entity types with mixed settings.
PermissionsGeneratorTest::givenSingleEntityTypeGeneratesCorrectPermissions in tests/src/Unit/PermissionsGeneratorTest.php
Tests permission creation for a single entity type.
PermissionsGeneratorTest::givenSingleEntityTypeWithAuthorFieldGeneratesCorrectPermissions in tests/src/Unit/PermissionsGeneratorTest.php
Tests permission creation for an entity type with an author field.

File

tests/src/Unit/PermissionsGeneratorTest.php, line 107

Class

PermissionsGeneratorTest
Tests the form element implementation.

Namespace

Drupal\Tests\eck\Unit

Code

protected function assertGlobalPermissions($permissions) {
  foreach ($this->entities as $id => $entity) {
    $this
      ->assertArrayHasKey("edit any {$id} entities", $permissions);
    $this
      ->assertArrayHasKey("delete any {$id} entities", $permissions);
    $this
      ->assertArrayHasKey("view any {$id} entities", $permissions);
  }
}