_data = array( 'key1' => 'value1', 'key2' => 'value2', ); $this->_result = new Solarium_Result_Select_Stats($this->_data); } public function testGetResult() { $this->assertEquals($this->_data['key1'], $this->_result->getResult('key1')); } public function testGetInvalidResult() { $this->assertEquals(null, $this->_result->getResult('key3')); } public function testGetResults() { $this->assertEquals($this->_data, $this->_result->getResults()); } public function testIterator() { $items = array(); foreach($this->_result AS $key => $item) { $items[$key] = $item; } $this->assertEquals($this->_data, $items); } public function testCount() { $this->assertEquals(count($this->_data), count($this->_result)); } }