protected function FieldStorageConfigResourceTestBase::createEntity in Drupal 10
Same name and namespace in other branches
- 8 core/modules/field/tests/src/Functional/Rest/FieldStorageConfigResourceTestBase.php \Drupal\Tests\field\Functional\Rest\FieldStorageConfigResourceTestBase::createEntity()
- 9 core/modules/field/tests/src/Functional/Rest/FieldStorageConfigResourceTestBase.php \Drupal\Tests\field\Functional\Rest\FieldStorageConfigResourceTestBase::createEntity()
Creates the entity to be tested.
Return value
\Drupal\Core\Entity\EntityInterface The entity to be tested.
Overrides EntityResourceTestBase::createEntity
File
- core/
modules/ field/ tests/ src/ Functional/ Rest/ FieldStorageConfigResourceTestBase.php, line 35
Class
Namespace
Drupal\Tests\field\Functional\RestCode
protected function createEntity() {
$field_storage = FieldStorageConfig::create([
'field_name' => 'true_llama',
'entity_type' => 'node',
'type' => 'boolean',
]);
$field_storage
->save();
return $field_storage;
}