public function HideOnlyOneItemProcessorTest::testWithMoreResults in Facets 8
Tests with one result.
@covers ::build
File
- tests/
src/ Unit/ Plugin/ processor/ HideOnlyOneItemProcessorTest.php, line 60
Class
- HideOnlyOneItemProcessorTest
- Class HideOnlyOneItemProcessorTest.
Namespace
Drupal\Tests\facets\Unit\Plugin\processorCode
public function testWithMoreResults() {
$processor = new HideOnlyOneItemProcessor([], 'hide_only_one_item', []);
$facet = new Facet([], 'facets_facet');
$results = [
new Result($facet, '1', 1, 1),
new Result($facet, '2', 2, 2),
];
$facet = $this
->getMockBuilder(Facet::class)
->disableOriginalConstructor()
->getMock();
$processed_results = $processor
->build($facet, $results);
$this
->assertCount(2, $processed_results);
}