You are here

public function FacetTest::testOnlyVisible in Facets 8

Tests facet visibility.

@covers ::setOnlyVisibleWhenFacetSourceIsVisible @covers ::getOnlyVisibleWhenFacetSourceIsVisible

File

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

Class

FacetTest
Class FacetTest.

Namespace

Drupal\Tests\facets\Kernel\Entity

Code

public function testOnlyVisible() {
  $entity = new Facet([], 'facets_facet');
  $this
    ->assertNull($entity
    ->getOnlyVisibleWhenFacetSourceIsVisible());
  $entity
    ->setOnlyVisibleWhenFacetSourceIsVisible(TRUE);
  $this
    ->assertTrue($entity
    ->getOnlyVisibleWhenFacetSourceIsVisible());
}