You are here

public function FacetTest::testDescription in Facets 8

Tests for getters that don't have setters.

@covers ::getDescription @covers ::getName

File

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

Class

FacetTest
Class FacetTest.

Namespace

Drupal\Tests\facets\Kernel\Entity

Code

public function testDescription() {
  $entity = new Facet([
    'description' => 'Owls',
  ], 'facets_facet');
  $this
    ->assertEquals('Owls', $entity
    ->getDescription());
  $entity = new Facet([
    'description' => 'Owls',
    'name' => 'owl',
  ], 'facets_facet');
  $this
    ->assertEquals('owl', $entity
    ->getName());
}