_docs = array('key1' => 'dummy1', 'key2' => 'dummy2'); $this->_result = new Solarium_Result_Select_Debug_DocumentSet($this->_docs); } public function testGetDocument() { $this->assertEquals( $this->_docs['key1'], $this->_result->getDocument('key1') ); } public function testGetDocumentWithInvalidKey() { $this->assertEquals( null, $this->_result->getDocument('invalidkey') ); } public function testGetDocuments() { $this->assertEquals( $this->_docs, $this->_result->getDocuments() ); } public function testIterator() { $items = array(); foreach($this->_result AS $key => $item) { $items[$key] = $item; } $this->assertEquals($this->_docs, $items); } public function testCount() { $this->assertEquals(count($this->_docs), count($this->_result)); } }