You are here

public function TermWeightWidgetOrderProcessorTest::testEqual in Facets 8

Tests that sorting two terms of equal weight yields 0.

File

tests/src/Unit/Plugin/processor/TermWeightWidgetOrderProcessorTest.php, line 120

Class

TermWeightWidgetOrderProcessorTest
Unit test for processor.

Namespace

Drupal\Tests\facets\Unit\Plugin\processor

Code

public function testEqual() {
  $this->termA
    ->expects($this
    ->any())
    ->method('getWeight')
    ->willReturn('1');
  $this->termB
    ->expects($this
    ->any())
    ->method('getWeight')
    ->willReturn('1');
  $sort_value = $this->processor
    ->sortResults($this->originalResults[0], $this->originalResults[1]);
  $this
    ->assertEquals(0, $sort_value);
}