protected function FieldKernelTestBase::setUp in Drupal 9
Same name and namespace in other branches
- 8 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
38 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.
38 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',
]);
// 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();
}