function 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 37
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.