function FieldConfigAccessControlHandlerTest::setUp
Overrides FieldStorageConfigAccessControlHandlerTest::setUp
File
- 
              core/
modules/ field/ tests/ src/ Unit/ FieldConfigAccessControlHandlerTest.php, line 20  
Class
- FieldConfigAccessControlHandlerTest
 - Tests the field config access controller.
 
Namespace
Drupal\Tests\field\UnitCode
protected function setUp() : void {
  parent::setUp();
  $this->entity = new FieldConfig([
    'field_name' => $this->entity
      ->getName(),
    'entity_type' => 'node',
    'fieldStorage' => $this->entity,
    'bundle' => 'test_bundle',
    'field_type' => 'test_field',
  ], 'node');
  $this->accessControlHandler = new FieldConfigAccessControlHandler($this->entity
    ->getEntityType());
  $this->accessControlHandler
    ->setModuleHandler($this->moduleHandler);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.