_matches = 12; $this->_numberOfGroups = 6; $this->_items = array( 'key1' => 'content1', 'key2' => 'content2', ); $this->_group = new Solarium_Result_Select_Grouping_FieldGroup($this->_matches, $this->_numberOfGroups, $this->_items); } public function testGetMatches() { $this->assertEquals( $this->_matches, $this->_group->getMatches() ); } public function testGetNumberOfGroups() { $this->assertEquals( $this->_numberOfGroups, $this->_group->getNumberOfGroups() ); } 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)); } }