function 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 37  
Class
Namespace
Drupal\Tests\taxonomy\Functional\RestCode
protected function createEntity() {
  $vocabulary = Vocabulary::create([
    'name' => 'Llama',
    'vid' => 'llama',
  ]);
  $vocabulary->save();
  return $vocabulary;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.