_docs = array( new Solarium_Document_ReadOnly(array('id'=>1,'name'=>'test1')), new Solarium_Document_ReadOnly(array('id'=>2,'name'=>'test2')), ); $this->_mltResult = new Solarium_Result_Select_MoreLikeThis_Result(2, 5.13, $this->_docs); } public function testGetNumFound() { $this->assertEquals(2, $this->_mltResult->getNumFound()); } public function testGetMaximumScore() { $this->assertEquals(5.13, $this->_mltResult->getMaximumScore()); } public function testGetDocuments() { $this->assertEquals($this->_docs, $this->_mltResult->getDocuments()); } public function testIterator() { $docs = array(); foreach($this->_mltResult AS $key => $doc) { $docs[$key] = $doc; } $this->assertEquals($this->_docs, $docs); } public function testCount() { $this->assertEquals(count($this->_docs), count($this->_mltResult)); } }