You are here

public function FieldPermissionsServiceTest::setUp in Field Permissions 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/FieldPermissionsServiceTest.php \Drupal\Tests\field_permissions\Unit\FieldPermissionsServiceTest::setUp()

Overrides UnitTestCase::setUp

File

tests/src/Unit/FieldPermissionsServiceTest.php, line 51

Class

FieldPermissionsServiceTest
Tests the field permissions service.

Namespace

Drupal\Tests\field_permissions\Unit

Code

public function setUp() {
  parent::setUp();
  $entity_type_manager = $this
    ->prophesize(EntityTypeManagerInterface::class);
  $this->entityTypeManager = $entity_type_manager
    ->reveal();
  $permission_type_manager = $this
    ->prophesize(Manager::class);
  $this->permissionTypeManager = $permission_type_manager
    ->reveal();
  $this->fieldPermissionsService = new FieldPermissionsService($this->entityTypeManager, $this->permissionTypeManager);
}