You are here

protected function EntityValidationTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php \Drupal\KernelTests\Core\Entity\EntityValidationTest::setUp()

Overrides EntityKernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php, line 40

Class

EntityValidationTest
Tests the Entity Validation API.

Namespace

Drupal\KernelTests\Core\Entity

Code

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

  // Enable an additional language.
  ConfigurableLanguage::createFromLangcode('de')
    ->save();
  $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');

  // Create the test field.
  module_load_install('entity_test');
  entity_test_install();

  // Install required default configuration for filter module.
  $this
    ->installConfig([
    'system',
    'filter',
  ]);
}