You are here

protected function FieldAccessTest::setUp in Drupal 9

Same name in this branch
  1. 9 core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php \Drupal\KernelTests\Core\Field\FieldAccessTest::setUp()
  2. 9 core/modules/field/tests/src/Functional/FieldAccessTest.php \Drupal\Tests\field\Functional\FieldAccessTest::setUp()
Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php \Drupal\KernelTests\Core\Field\FieldAccessTest::setUp()

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php, line 41

Class

FieldAccessTest
Tests Field level access hooks.

Namespace

Drupal\KernelTests\Core\Field

Code

protected function setUp() : void {
  parent::setUp();

  // Install field configuration.
  $this
    ->installConfig([
    'field',
  ]);
  $this
    ->installEntitySchema('entity_test');
  $this
    ->installEntitySchema('entity_test_mul');
  $this
    ->installEntitySchema('entity_test_mul_langcode_key');
  $this
    ->installEntitySchema('entity_test_mul_changed');
  $this
    ->installEntitySchema('entity_test_rev');
  $this
    ->installEntitySchema('entity_test_mulrev');
  $this
    ->installEntitySchema('entity_test_mulrev_changed');

  // The users table is needed for creating dummy user accounts.
  $this
    ->installEntitySchema('user');

  // Register entity_test text field.
  module_load_install('entity_test');
  entity_test_install();
}