Commit c0bbb200 authored by Bas de Nooijer's avatar Bas de Nooijer

Several improvements based on CI

parent 076c0c87
......@@ -177,7 +177,7 @@ class Solarium_Client_ResponseParser_Select_Component_FacetSet
$offset = 0;
$counts = array();
while(isset($data['counts'][$offset]) && isset($data['counts'][$offset+1])) {
while (isset($data['counts'][$offset]) && isset($data['counts'][$offset+1])) {
$counts[$data['counts'][$offset]] = $data['counts'][$offset+1];
$offset += 2;
}
......
......@@ -98,8 +98,7 @@ class Solarium_Configurable
if (is_object($options)) {
$options = $options->toArray();
} else {
throw new Solarium_Exception('Options must be an '
. 'array or a Zend_Config object');
throw new Solarium_Exception('Options must be an array or a Zend_Config object');
}
}
......
......@@ -133,8 +133,7 @@ class Solarium_Query_Select_Component_Facet_MultiQuery extends Solarium_Query_Se
}
if (array_key_exists($key, $this->_facetQueries)) {
throw new Solarium_Exception('A query must have a unique key'
. ' value within a multiquery facet');
throw new Solarium_Exception('A query must have a unique key value within a multiquery facet');
}
// forward shared excludes
......
......@@ -48,7 +48,8 @@ class Solarium_Result_Analysis_ItemTest extends PHPUnit_Framework_TestCase
'position' => 2,
'positionHistory' => array(2,1),
'type' => '<dummytype>',
'raw_text' => 'dummy raw text'
'raw_text' => 'dummy raw text',
'match' => true
);
$this->_item = new Solarium_Result_Analysis_Item($this->_data);
}
......@@ -101,4 +102,9 @@ class Solarium_Result_Analysis_ItemTest extends PHPUnit_Framework_TestCase
$item = new Solarium_Result_Analysis_Item($data);
$this->assertEquals(null, $item->getRawText());
}
public function testGetMatch()
{
$this->assertEquals($this->_data['match'], $this->_item->getMatch());
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment