_items = array( 'key1' => 'content1', 'key2' => 'content2', ); $this->_result = new Solarium_Result_Select_Highlighting($this->_items); } public function testGetResults() { $this->assertEquals($this->_items, $this->_result->getResults()); } public function testGetResult() { $this->assertEquals( $this->_items['key2'], $this->_result->getResult('key2') ); } public function testGetInvalidResult() { $this->assertEquals( null, $this->_result->getResult('invalid') ); } public function testIterator() { $items = array(); foreach($this->_result AS $key => $item) { $items[$key] = $item; } $this->assertEquals($this->_items, $items); } public function testCount() { $this->assertEquals(count($this->_items), count($this->_result)); } }