You are here

public function FacetTest::testEmptyBehavior in Facets 8

Tests empty behavior.

@covers ::setEmptyBehavior @covers ::getEmptyBehavior

File

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

Class

FacetTest
Class FacetTest.

Namespace

Drupal\Tests\facets\Kernel\Entity

Code

public function testEmptyBehavior() {
  $entity = new Facet([], 'facets_facet');
  $this
    ->assertEmpty($entity
    ->getEmptyBehavior());
  $entity
    ->setEmptyBehavior([
    'behavior' => 'none',
  ]);
  $this
    ->assertEquals([
    'behavior' => 'none',
  ], $entity
    ->getEmptyBehavior());
}