public function FacetSummaryResourceTestBase::createEntity in Facets 8
Creates the entity to be tested.
Return value
\Drupal\Core\Entity\EntityInterface The entity to be tested.
Overrides EntityResourceTestBase::createEntity
File
- modules/
facets_summary/ tests/ src/ Functional/ Rest/ FacetSummaryResourceTestBase.php, line 43
Class
- FacetSummaryResourceTestBase
- Class FacetSummaryResourceTestBase.
Namespace
Drupal\Tests\facets_summary\Functional\RestCode
public function createEntity() {
$entity = FacetsSummary::create();
$entity
->set('id', 'tapir')
->set('name', 'Tapir')
->set('uuid', 'tapir-uuid')
->save();
return $entity;
}