You are here

public function CountWidgetOrderProcessorTest::testSorting in Facets 8

Tests sorting.

File

tests/src/Unit/Plugin/processor/CountWidgetOrderProcessorTest.php, line 50

Class

CountWidgetOrderProcessorTest
Unit test for processor.

Namespace

Drupal\Tests\facets\Unit\Plugin\processor

Code

public function testSorting() {
  $sort_value = $this->processor
    ->sortResults($this->originalResults[0], $this->originalResults[1]);
  $this
    ->assertEquals(1, $sort_value);
  $sort_value = $this->processor
    ->sortResults($this->originalResults[1], $this->originalResults[2]);
  $this
    ->assertEquals(-1, $sort_value);
  $sort_value = $this->processor
    ->sortResults($this->originalResults[2], $this->originalResults[2]);
  $this
    ->assertEquals(0, $sort_value);
}