You are here

public function FacetTest::testFieldIdentifier in Facets 8

Tests field identifier.

@covers ::getFieldIdentifier @covers ::setFieldIdentifier @covers ::getFieldAlias

File

tests/src/Kernel/Entity/FacetTest.php, line 301

Class

FacetTest
Class FacetTest.

Namespace

Drupal\Tests\facets\Kernel\Entity

Code

public function testFieldIdentifier() {
  $entity = new Facet([], 'facets_facet');
  $this
    ->assertEmpty($entity
    ->getFieldIdentifier());
  $entity
    ->setFieldIdentifier('field_owl');
  $this
    ->assertEquals('field_owl', $entity
    ->getFieldIdentifier());
  $this
    ->assertEquals('field_owl', $entity
    ->getFieldAlias());
}