protected function FieldConfigAccessControlHandlerTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/field/tests/src/Unit/FieldConfigAccessControlHandlerTest.php \Drupal\Tests\field\Unit\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() {
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);
}