You are here

public function FacetSourceResourceTestBase::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

tests/src/Functional/Rest/FacetSourceResourceTestBase.php, line 43

Class

FacetSourceResourceTestBase
Class FacetSourceResourceTestBase.

Namespace

Drupal\Tests\facets\Functional\Rest

Code

public function createEntity() {
  $entity = FacetSource::create();
  $entity
    ->set('id', 'red_panda')
    ->set('name', 'Red panda')
    ->set('uuid', 'red-panda-uuid')
    ->save();
  return $entity;
}