public function TermWeightWidgetOrderProcessorTest::testHigher in Facets 8
Compare a term with a high weight with a term with a low.
File
- tests/
src/ Unit/ Plugin/ processor/ TermWeightWidgetOrderProcessorTest.php, line 136
Class
- TermWeightWidgetOrderProcessorTest
- Unit test for processor.
Namespace
Drupal\Tests\facets\Unit\Plugin\processorCode
public function testHigher() {
$this->termA
->expects($this
->any())
->method('getWeight')
->willReturn('10');
$this->termB
->expects($this
->any())
->method('getWeight')
->willReturn('-10');
$sort_value = $this->processor
->sortResults($this->originalResults[0], $this->originalResults[1]);
$this
->assertGreaterThan(0, $sort_value);
}