public function QueryStringTest::testEmptyBuild in Facets 8
Tests with an empty build.
File
- tests/
src/ Unit/ Plugin/ url_processor/ QueryStringTest.php, line 165
Class
- QueryStringTest
- Unit test for processor.
Namespace
Drupal\Tests\facets\Unit\Plugin\url_processorCode
public function testEmptyBuild() {
$facet = new Facet([], 'facets_facet');
$facet
->setUrlAlias('test');
$facet
->setFacetSourceId('facet_source__dummy');
$request = new Request();
$request->query
->set('f', []);
$this->processor = new QueryString([
'facet' => $facet,
], 'query_string', [], $request, $this->entityManager, $this->eventDispatcher);
$results = $this->processor
->buildUrls($facet, []);
$this
->assertEmpty($results);
}