You are here

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

Asserts that the correct create permission is returned.

3 calls to PermissionsGeneratorTest::assertCreatePermission()
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 98

Class

PermissionsGeneratorTest
Tests the form element implementation.

Namespace

Drupal\Tests\eck\Unit

Code

protected function assertCreatePermission($permissions) {
  foreach ($this->entities as $id => $entity) {
    $this
      ->assertArrayHasKey("create {$id} entities", $permissions);
  }
}