_matches = 12; $this->_numFound = 6; $this->_start = 2; $this->_maximumScore = 0.89; $this->_items = array( 'key1' => 'content1', 'key2' => 'content2', ); $this->_group = new Solarium_Result_Select_Grouping_QueryGroup($this->_matches, $this->_numFound, $this->_start, $this->_maximumScore, $this->_items); } public function testGetMatches() { $this->assertEquals( $this->_matches, $this->_group->getMatches() ); } public function testGetNumFound() { $this->assertEquals( $this->_numFound, $this->_group->getNumFound() ); } public function testGetStart() { $this->assertEquals( $this->_start, $this->_group->getStart() ); } public function testGetMaximumScore() { $this->assertEquals( $this->_maximumScore, $this->_group->getMaximumScore() ); } public function testGetDocuments() { $this->assertEquals( $this->_items, $this->_group->getDocuments() ); } public function testIterator() { $items = array(); foreach($this->_group AS $key => $item) { $items[$key] = $item; } $this->assertEquals($this->_items, $items); } public function testCount() { $this->assertEquals(count($this->_items), count($this->_group)); } }