Пример #1
0
 public function setUp()
 {
     $this->_parser = new Solarium_Client_ResponseParser_Select_Component_Grouping();
     $this->_query = new Solarium_Query_Select();
     $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);
 }