function FieldStorageConfigValidationTest::setUp

Same name and namespace in other branches
  1. 10 core/modules/field/tests/src/Kernel/Entity/FieldStorageConfigValidationTest.php \Drupal\Tests\field\Kernel\Entity\FieldStorageConfigValidationTest::setUp()

Overrides ConfigEntityValidationTestBase::setUp

File

core/modules/field/tests/src/Kernel/Entity/FieldStorageConfigValidationTest.php, line 26

Class

FieldStorageConfigValidationTest
Tests validation of field_storage_config entities.

Namespace

Drupal\Tests\field\Kernel\Entity

Code

protected function setUp() : void {
    parent::setUp();
    $this->installEntitySchema('user');
    $this->entity = FieldStorageConfig::create([
        'type' => 'boolean',
        'field_name' => 'test',
        'entity_type' => 'user',
    ]);
    $this->entity
        ->save();
}

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