You are here

public function SummaryEntityTest::testFacetSourceId in Facets 8

Tests for facet sources.

@covers ::setFacetSourceId @covers ::getFacetSourceId

File

modules/facets_summary/tests/src/Kernel/SummaryEntityTest.php, line 53

Class

SummaryEntityTest
Class SummaryEntityTest.

Namespace

Drupal\Tests\facets_summary\Kernel

Code

public function testFacetSourceId() {
  $entity = new FacetsSummary([
    'description' => 'Owls',
    'name' => 'owl',
  ], 'facets_summary');
  $source = $entity
    ->setFacetSourceId('foo');
  $this
    ->assertInstanceOf(FacetsSummary::class, $source);
  $this
    ->assertEquals('foo', $entity
    ->getFacetSourceId());
}