function ValidReferenceConstraintValidatorTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php \Drupal\KernelTests\Core\Entity\ValidReferenceConstraintValidatorTest::setUp()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php \Drupal\KernelTests\Core\Entity\ValidReferenceConstraintValidatorTest::setUp()
  3. 11.x 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 43

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',
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.