function FieldKernelTestBase::setUp
Same name in other branches
- 9 core/modules/field/tests/src/Kernel/FieldKernelTestBase.php \Drupal\Tests\field\Kernel\FieldKernelTestBase::setUp()
- 10 core/modules/field/tests/src/Kernel/FieldKernelTestBase.php \Drupal\Tests\field\Kernel\FieldKernelTestBase::setUp()
- 11.x core/modules/field/tests/src/Kernel/FieldKernelTestBase.php \Drupal\Tests\field\Kernel\FieldKernelTestBase::setUp()
Set the default field storage backend for fields created during tests.
Overrides KernelTestBase::setUp
32 calls to FieldKernelTestBase::setUp()
- BooleanItemTest::setUp in core/
modules/ field/ tests/ src/ Kernel/ Boolean/ BooleanItemTest.php - Set the default field storage backend for fields created during tests.
- BulkDeleteTest::setUp in core/
modules/ field/ tests/ src/ Kernel/ BulkDeleteTest.php - Set the default field storage backend for fields created during tests.
- CommentItemTest::setUp in core/
modules/ comment/ tests/ src/ Kernel/ CommentItemTest.php - Set the default field storage backend for fields created during tests.
- ConfigFieldDefinitionTest::setUp in core/
modules/ field/ tests/ src/ Kernel/ ConfigFieldDefinitionTest.php - Set the default field storage backend for fields created during tests.
- DateRangeItemTest::setUp in core/
modules/ datetime_range/ tests/ src/ Kernel/ DateRangeItemTest.php - Set the default field storage backend for fields created during tests.
32 methods override FieldKernelTestBase::setUp()
- BooleanItemTest::setUp in core/
modules/ field/ tests/ src/ Kernel/ Boolean/ BooleanItemTest.php - Set the default field storage backend for fields created during tests.
- BulkDeleteTest::setUp in core/
modules/ field/ tests/ src/ Kernel/ BulkDeleteTest.php - Set the default field storage backend for fields created during tests.
- CommentItemTest::setUp in core/
modules/ comment/ tests/ src/ Kernel/ CommentItemTest.php - Set the default field storage backend for fields created during tests.
- ConfigFieldDefinitionTest::setUp in core/
modules/ field/ tests/ src/ Kernel/ ConfigFieldDefinitionTest.php - Set the default field storage backend for fields created during tests.
- DateRangeItemTest::setUp in core/
modules/ datetime_range/ tests/ src/ Kernel/ DateRangeItemTest.php - Set the default field storage backend for fields created during tests.
File
-
core/
modules/ field/ tests/ src/ Kernel/ FieldKernelTestBase.php, line 50
Class
- FieldKernelTestBase
- Parent class for Field API unit tests.
Namespace
Drupal\Tests\field\KernelCode
protected function setUp() {
parent::setUp();
$this->fieldTestData = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
$this->installEntitySchema('entity_test');
$this->installEntitySchema('user');
$this->installSchema('system', [
'sequences',
'key_value',
]);
// Set default storage backend and configure the theme system.
$this->installConfig([
'field',
'system',
]);
// Create user 1.
$storage = \Drupal::entityTypeManager()->getStorage('user');
$storage->create([
'uid' => 1,
'name' => 'entity-test',
'mail' => 'entity@localhost',
'status' => TRUE,
])
->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.