public function ActiveWidgetOrderProcessorTest::testSorting in Facets 8
Tests sorting.
File
- tests/
src/ Unit/ Plugin/ processor/ ActiveWidgetOrderProcessorTest.php, line 59
Class
- ActiveWidgetOrderProcessorTest
- Unit test for processor.
Namespace
Drupal\Tests\facets\Unit\Plugin\processorCode
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(0, $sort_value);
$sort_value = $this->processor
->sortResults($this->originalResults[2], $this->originalResults[3]);
$this
->assertEquals(0, $sort_value);
$sort_value = $this->processor
->sortResults($this->originalResults[3], $this->originalResults[4]);
$this
->assertEquals(-1, $sort_value);
$sort_value = $this->processor
->sortResults($this->originalResults[3], $this->originalResults[3]);
$this
->assertEquals(0, $sort_value);
}