setFields(array('fieldA','fieldB')); $component->setQueries(array('cat:1','cat:2')); $component->setLimit(12); $component->setOffset(2); $component->setSort('score desc'); $component->setMainResult(true); $component->setNumberOfGroups(false); $component->setCachePercentage(50); $component->setTruncate(true); $request = $builder->buildComponent($component, $request); $this->assertEquals( array( 'group' => 'true', 'group.field' => array('fieldA','fieldB'), 'group.query' => array('cat:1','cat:2'), 'group.limit' => 12, 'group.offset' => 2, 'group.sort' => 'score desc', 'group.main' => 'true', 'group.ngroups' => 'false', 'group.cache.percent' => 50, 'group.truncate' => 'true', ), $request->getParams() ); } }