You are here

public function CustomAccessTest::setUp in Field Permissions 8

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

Overrides UnitTestCase::setUp

File

tests/src/Unit/Plugin/FieldPermissionType/CustomAccessTest.php, line 32

Class

CustomAccessTest
Tests for the custom access permission type plugin.

Namespace

Drupal\Tests\field_permissions\Unit\Plugin\FieldPermissionType

Code

public function setUp() {
  parent::setUp();
  $storage = $this
    ->prophesize(FieldStorageConfigInterface::class);
  $storage
    ->getName()
    ->willReturn('foo_field');
  $this->plugin = new CustomAccess([], 'custom', [], $storage
    ->reveal());
}