protected function FieldRdfaTestBase::createTestField in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php \Drupal\Tests\rdf\Kernel\Field\FieldRdfaTestBase::createTestField()
- 9 core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php \Drupal\Tests\rdf\Kernel\Field\FieldRdfaTestBase::createTestField()
Creates the field for testing.
Parameters
array $field_settings: (optional) An array of field settings.
15 calls to FieldRdfaTestBase::createTestField()
- DateTimeFieldRdfaTest::setUp in core/
modules/ rdf/ tests/ src/ Kernel/ Field/ DateTimeFieldRdfaTest.php - EmailFieldRdfaTest::setUp in core/
modules/ rdf/ tests/ src/ Kernel/ Field/ EmailFieldRdfaTest.php - FieldRdfaDatatypeCallbackTest::setUp in core/
modules/ rdf/ tests/ src/ Kernel/ Field/ FieldRdfaDatatypeCallbackTest.php - LinkFieldRdfaTest::setUp in core/
modules/ rdf/ tests/ src/ Kernel/ Field/ LinkFieldRdfaTest.php - NumberFieldRdfaTest::testDecimalFormatter in core/
modules/ rdf/ tests/ src/ Kernel/ Field/ NumberFieldRdfaTest.php - Tests the decimal formatter.
File
- core/
modules/ rdf/ tests/ src/ Kernel/ Field/ FieldRdfaTestBase.php, line 102
Class
Namespace
Drupal\Tests\rdf\Kernel\FieldCode
protected function createTestField($field_settings = []) {
FieldStorageConfig::create([
'field_name' => $this->fieldName,
'entity_type' => 'entity_test',
'type' => $this->fieldType,
])
->save();
FieldConfig::create([
'entity_type' => 'entity_test',
'field_name' => $this->fieldName,
'bundle' => 'entity_test',
'settings' => $field_settings,
])
->save();
}