You are here

protected function ValidReferenceConstraintValidatorTest::setUp in Drupal 9

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

Overrides EntityKernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php, line 41

Class

ValidReferenceConstraintValidatorTest
Tests validation constraints for ValidReferenceConstraintValidator.

Namespace

Drupal\KernelTests\Core\Entity

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installSchema('user', [
    'users_data',
  ]);
  $this
    ->installSchema('node', [
    'node_access',
  ]);
  $this
    ->installConfig('node');
  $this->typedData = $this->container
    ->get('typed_data_manager');
  $this
    ->createContentType([
    'type' => 'article',
    'name' => 'Article',
  ]);
  $this
    ->createContentType([
    'type' => 'page',
    'name' => 'Basic page',
  ]);
}