_suggestions = array( 'key1' => 'content1', 'key2' => 'content2', ); $this->_collation = 'dummy1'; $this->_correctlySpelled = false; $this->_result = new Solarium_Result_Select_Spellcheck($this->_suggestions, $this->_collation, $this->_correctlySpelled); } public function testGetCollation() { $this->assertEquals($this->_collation, $this->_result->getCollation()); } public function testGetCorrectlySpelled() { $this->assertEquals($this->_correctlySpelled, $this->_result->getCorrectlySpelled()); } public function testGetSuggestion() { $this->assertEquals($this->_suggestions['key1'], $this->_result->getSuggestion('key1')); } public function testGetInvalidSuggestion() { $this->assertEquals(null, $this->_result->getSuggestion('key3')); } public function testGetSuggestions() { $this->assertEquals($this->_suggestions, $this->_result->getSuggestions()); } public function testIterator() { $items = array(); foreach($this->_result AS $key => $item) { $items[$key] = $item; } $this->assertEquals($this->_suggestions, $items); } public function testCount() { $this->assertEquals(count($this->_suggestions), count($this->_result)); } }