_parser = new Solarium_Client_ResponseParser_Select_Component_Stats(); } public function testParse() { $data = array( 'stats' => array( 'stats_fields' => array( 'fieldA' => array( 'min' => 3, ), 'fieldB' => array( 'min' => 4, 'facets' => array( 'fieldC' => array( 'value1' => array( 'min' => 5, ) ) ) ) ) ) ); $result = $this->_parser->parse(null, null, $data); $this->assertEquals(3, $result->getResult('fieldA')->getMin()); $this->assertEquals(4, $result->getResult('fieldB')->getMin()); $facets = $result->getResult('fieldB')->getFacets(); $this->assertEquals(5, $facets['fieldC']['value1']->getMin()); } public function testParseNoData() { $result = $this->_parser->parse(null, null, array()); $this->assertEquals(0, count($result)); } }