You are here

public function FacetSourceTest::testConstruct in Facets 8

Tests constructor.

@covers ::getName @covers ::getFilterKey @covers ::getUrlProcessorName

File

tests/src/Kernel/Entity/FacetSourceTest.php, line 40

Class

FacetSourceTest
Class FacetSourceTest.

Namespace

Drupal\Tests\facets\Kernel\Entity

Code

public function testConstruct() {
  $fs = new FacetSource([
    'id' => 'llama',
    'name' => 'Llama',
    'filter_key' => 'u',
    'url_processor' => 'monkey',
  ], 'facets_facet_source');
  $this
    ->assertEquals('u', $fs
    ->getFilterKey());
  $this
    ->assertEquals('monkey', $fs
    ->getUrlProcessorName());
  $this
    ->assertEquals('Llama', $fs
    ->getName());
}