protected function VocabularyResourceTestBase::createEntity in Drupal 10
Same name and namespace in other branches
- 8 core/modules/taxonomy/tests/src/Functional/Rest/VocabularyResourceTestBase.php \Drupal\Tests\taxonomy\Functional\Rest\VocabularyResourceTestBase::createEntity()
- 9 core/modules/taxonomy/tests/src/Functional/Rest/VocabularyResourceTestBase.php \Drupal\Tests\taxonomy\Functional\Rest\VocabularyResourceTestBase::createEntity()
Creates the entity to be tested.
Return value
\Drupal\Core\Entity\EntityInterface The entity to be tested.
Overrides EntityResourceTestBase::createEntity
File
- core/
modules/ taxonomy/ tests/ src/ Functional/ Rest/ VocabularyResourceTestBase.php, line 35
Class
Namespace
Drupal\Tests\taxonomy\Functional\RestCode
protected function createEntity() {
$vocabulary = Vocabulary::create([
'name' => 'Llama',
'vid' => 'llama',
]);
$vocabulary
->save();
return $vocabulary;
}