You are here

public function FacetTest::testWeight in Facets 8

Tests facet weight.

@covers ::setWeight @covers ::getWeight

File

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

Class

FacetTest
Class FacetTest.

Namespace

Drupal\Tests\facets\Kernel\Entity

Code

public function testWeight() {
  $entity = new Facet([], 'facets_facet');
  $this
    ->assertNull($entity
    ->getWeight());
  $entity
    ->setWeight(12);
  $this
    ->assertEquals(12, $entity
    ->getWeight());
}