public function setUp() { $this->parser = new Parser(); $this->query = new Query(); $this->grouping = $this->query->getGrouping(); $this->grouping->addField('fieldA'); $this->grouping->addQuery('cat:1'); $data = array('grouped' => array('fieldA' => array('matches' => 25, 'ngroups' => 12, 'groups' => array(array('groupValue' => 'test value', 'doclist' => array('numFound' => 13, 'docs' => array(array('id' => 1, 'name' => 'test')))))), 'cat:1' => array('matches' => 40, 'doclist' => array('numFound' => 22, 'docs' => array(array('id' => 2, 'name' => 'dummy2'), array('id' => 5, 'name' => 'dummy5')))))); $this->result = $this->parser->parse($this->query, $this->grouping, $data); }
public function testGetGrouping() { $grouping = $this->query->getGrouping(); $this->assertEquals('Solarium\\QueryType\\Select\\Query\\Component\\Grouping', get_class($grouping)); }