Exemple #1
0
 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);
 }