Commit a08d8410 authored by Dorian Villet's avatar Dorian Villet

Added last comma to every non-inline arrays.

parent 8a364a5a
......@@ -74,25 +74,25 @@ class PeclHttpTest extends \PHPUnit_Framework_TestCase
// prevents undefined constants errors
if (function_exists('http_get')) {
$methods = array(
Request::METHOD_GET => array(
Request::METHOD_GET => array(
'method' => HTTP_METH_GET,
'support' => true
'support' => true,
),
Request::METHOD_POST => array(
'method' => HTTP_METH_POST,
'support' => true
'support' => true,
),
Request::METHOD_HEAD => array(
'method' => HTTP_METH_HEAD,
'support' => true
'support' => true,
),
'PUT' => array(
'PUT' => array(
'method' => HTTP_METH_PUT,
'support' => false
'support' => false,
),
'DELETE' => array(
'DELETE' => array(
'method' => HTTP_METH_DELETE,
'support' => false
'support' => false,
),
);
......@@ -113,7 +113,7 @@ class PeclHttpTest extends \PHPUnit_Framework_TestCase
array(
'header' => array(
'Content-Type: application/json',
'User-Agent: Foo'
'User-Agent: Foo',
),
'authentication' => array(
'username' => 'someone',
......
......@@ -125,14 +125,14 @@ class ClientTest extends \PHPUnit_Framework_TestCase
),
'querytype' => array(
array(
'type' => 'myquerytype',
'query' => 'MyQuery',
'type' => 'myquerytype',
'query' => 'MyQuery',
)
),
'plugin' => array(
array(
'key' => 'myplugin',
'plugin' => __NAMESPACE__.'\\MyClientPlugin',
'key' => 'myplugin',
'plugin' => __NAMESPACE__.'\\MyClientPlugin',
'options' => array(
'option1' => 'value1',
'option2' => 'value2',
......@@ -396,7 +396,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
$adapterOptions = array(
'host' => 'myhost',
'port' => 8080,
'customOption' => 'foobar'
'customOption' => 'foobar',
);
$observer = $this->getMock('Solarium\Core\Client\Adapter\Http', array('setOptions', 'execute'));
......
......@@ -48,13 +48,13 @@ class EndpointTest extends \PHPUnit_Framework_TestCase
public function testConfigMode()
{
$options = array(
'host' => '192.168.0.1',
'port' => 123,
'path' => '/mysolr/',
'core' => 'mycore',
'timeout' => 3,
'host' => '192.168.0.1',
'port' => 123,
'path' => '/mysolr/',
'core' => 'mycore',
'timeout' => 3,
'username' => 'x',
'password' => 'y'
'password' => 'y',
);
$this->endpoint->setOptions($options);
......@@ -132,13 +132,13 @@ class EndpointTest extends \PHPUnit_Framework_TestCase
public function testToString()
{
$options = array(
'host' => '192.168.0.1',
'port' => 123,
'path' => '/mysolr/',
'core' => 'mycore',
'timeout' => 3,
'host' => '192.168.0.1',
'port' => 123,
'path' => '/mysolr/',
'core' => 'mycore',
'timeout' => 3,
'username' => 'x',
'password' => 'y'
'password' => 'y',
);
$this->endpoint->setOptions($options);
......
......@@ -48,14 +48,14 @@ class RequestTest extends \PHPUnit_Framework_TestCase
public function testConfigMode()
{
$options = array(
'method' => Request::METHOD_POST,
'handler' => 'myHandler',
'param' => array(
'method' => Request::METHOD_POST,
'handler' => 'myHandler',
'param' => array(
'param1' => 1,
'param2' => 'test',
),
'rawdata' => 'raw post data here',
'header' => array(
'rawdata' => 'raw post data here',
'header' => array(
'myHeader1' => 'X-myHeader1: value1',
'myHeader2' => 'X-myHeader2: value2',
),
......@@ -98,7 +98,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(
array(
'username' => $options['authentication']['username'],
'password' => $options['authentication']['password']
'password' => $options['authentication']['password'],
),
$this->request->getAuthentication()
);
......@@ -460,14 +460,14 @@ class RequestTest extends \PHPUnit_Framework_TestCase
public function testToString()
{
$options = array(
'method' => Request::METHOD_POST,
'handler' => '/myHandler',
'param' => array(
'method' => Request::METHOD_POST,
'handler' => '/myHandler',
'param' => array(
'param1' => 1,
'param2' => 'test content',
),
'rawdata' => 'post data',
'header' => array(
'rawdata' => 'post data',
'header' => array(
'myHeader1' => 'X-myHeader1: value1',
'myHeader2' => 'X-myHeader2: value2',
),
......
......@@ -60,7 +60,7 @@ class CustomizeRequestTest extends \PHPUnit_Framework_TestCase
'type' => 'header',
'name' => 'X-my-auth',
'value' => 'mypassword',
'persistent' => true
'persistent' => true,
),
'id' => array(
'type' => 'param',
......@@ -137,7 +137,7 @@ class CustomizeRequestTest extends \PHPUnit_Framework_TestCase
'type' => 'header',
'name' => 'X-my-auth',
'value' => 'mypassword',
'persistent' => true
'persistent' => true,
);
$customization = $this->plugin->createCustomization($input);
......@@ -353,7 +353,7 @@ class CustomizeRequestTest extends \PHPUnit_Framework_TestCase
'type' => 'header',
'name' => 'X-my-auth',
'value' => 'mypassword',
'persistent' => true
'persistent' => true,
);
$this->plugin->addCustomization($input);
......@@ -418,7 +418,7 @@ class CustomizeRequestTest extends \PHPUnit_Framework_TestCase
'type' => 'header',
'name' => 'X-my-auth',
'value' => 'mypassword',
'persistent' => true
'persistent' => true,
);
$this->plugin->addCustomization($input);
......
......@@ -61,10 +61,10 @@ class LoadbalancerTest extends \PHPUnit_Framework_TestCase
$options = array(
'endpoint' => array(
'server1' => array(
'host' => 'host1'
'host' => 'host1',
),
'server2' => array(
'host' => 'host2'
'host' => 'host2',
),
),
);
......
......@@ -42,7 +42,7 @@ class DocumentTest extends \PHPUnit_Framework_TestCase
),
'responseHeader' => array(
'status' => 1,
'QTime' => 5
'QTime' => 5,
)
);
......
......@@ -72,7 +72,7 @@ class FieldTest extends \PHPUnit_Framework_TestCase
),
'responseHeader' => array(
'status' => 1,
'QTime' => 5
'QTime' => 5,
)
);
......@@ -102,7 +102,7 @@ class FieldTest extends \PHPUnit_Framework_TestCase
$data = array(
'responseHeader' => array(
'status' => 1,
'QTime' => 5
'QTime' => 5,
)
);
......
......@@ -52,7 +52,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase
'positionHistory' => array(2, 1),
'type' => '<dummytype>',
'raw_text' => 'dummy raw text',
'match' => true
'match' => true,
);
$this->item = new Item($this->data);
}
......
......@@ -70,7 +70,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
);
$options = array(
'fmap' => $mappings
'fmap' => $mappings,
);
$this->query->setOptions($options);
......
......@@ -172,7 +172,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
{
$sorts = array(
'field1' => Query::SORT_DESC,
'field2' => Query::SORT_ASC
'field2' => Query::SORT_ASC,
);
$this->query->addSorts($sorts);
......@@ -186,7 +186,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
{
$sorts = array(
'field1' => Query::SORT_DESC,
'field2' => Query::SORT_ASC
'field2' => Query::SORT_ASC,
);
$this->query->addSorts($sorts);
......@@ -201,7 +201,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
{
$sorts = array(
'field1' => Query::SORT_DESC,
'field2' => Query::SORT_ASC
'field2' => Query::SORT_ASC,
);
$this->query->addSorts($sorts);
......@@ -216,7 +216,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
{
$sorts = array(
'field1' => Query::SORT_DESC,
'field2' => Query::SORT_ASC
'field2' => Query::SORT_ASC,
);
$this->query->addSorts($sorts);
......@@ -231,7 +231,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
{
$sorts = array(
'field1' => Query::SORT_DESC,
'field2' => Query::SORT_ASC
'field2' => Query::SORT_ASC,
);
$this->query->addSorts($sorts);
......@@ -422,11 +422,11 @@ class QueryTest extends \PHPUnit_Framework_TestCase
public function testConfigMode()
{
$config = array(
'query' => 'text:mykeyword',
'sort' => array('score' => 'asc'),
'query' => 'text:mykeyword',
'sort' => array('score' => 'asc'),
'fields' => array('id', 'title', 'category'),
'rows' => 100,
'start' => 200,
'rows' => 100,
'start' => 200,
'filterquery' => array(
array('key' => 'pub', 'tag' => array('pub'), 'query' => 'published:true'),
'online' => array('tag' => 'onl', 'query' => 'online:true')
......
......@@ -44,7 +44,7 @@ class ResponseParserTest extends \PHPUnit_Framework_TestCase
array('fieldA' => 1, 'fieldB' => 'Test'),
array('fieldA' => 2, 'fieldB' => 'Test2')
),
'numFound' => 503
'numFound' => 503,
),
'responseHeader' => array(
'status' => 1,
......
......@@ -61,7 +61,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
public function testConfigMode()
{
$options = array(
'handler' => 'myHandler',
'handler' => 'myHandler',
'resultclass' => 'myResult',
);
$this->query->setOptions($options);
......
......@@ -59,7 +59,7 @@ class MultiQueryTest extends \PHPUnit_Framework_TestCase
'exclude' => array('fq1', 'fq2')
),
'k2' => array(
'query' => 'category:2'
'query' => 'category:2',
),
)
);
......@@ -82,7 +82,7 @@ class MultiQueryTest extends \PHPUnit_Framework_TestCase
public function testConfigModeSingleQuery()
{
$options = array(
'query' => 'category:2'
'query' => 'category:2',
);
$this->facet->setOptions($options);
......@@ -237,7 +237,7 @@ class MultiQueryTest extends \PHPUnit_Framework_TestCase
'exclude' => array('fq1', 'fq2')
),
'k2' => array(
'query' => 'category:2'
'query' => 'category:2',
),
);
$this->facet->addQueries($config);
......
......@@ -183,7 +183,7 @@ class HighlightingTest extends \PHPUnit_Framework_TestCase
{
$config = array(
'name' => 'fieldA',
'snippets' => 6
'snippets' => 6,
);
$this->hlt->addField($config);
......
......@@ -181,7 +181,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
{
$sorts = array(
'field1' => Query::SORT_DESC,
'field2' => Query::SORT_ASC
'field2' => Query::SORT_ASC,
);
$this->query->addSorts($sorts);
......@@ -195,7 +195,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
{
$sorts = array(
'field1' => Query::SORT_DESC,
'field2' => Query::SORT_ASC
'field2' => Query::SORT_ASC,
);
$this->query->addSorts($sorts);
......@@ -210,7 +210,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
{
$sorts = array(
'field1' => Query::SORT_DESC,
'field2' => Query::SORT_ASC
'field2' => Query::SORT_ASC,
);
$this->query->addSorts($sorts);
......@@ -225,7 +225,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
{
$sorts = array(
'field1' => Query::SORT_DESC,
'field2' => Query::SORT_ASC
'field2' => Query::SORT_ASC,
);
$this->query->addSorts($sorts);
......@@ -240,7 +240,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
{
$sorts = array(
'field1' => Query::SORT_DESC,
'field2' => Query::SORT_ASC
'field2' => Query::SORT_ASC,
);
$this->query->addSorts($sorts);
......@@ -431,11 +431,11 @@ class QueryTest extends \PHPUnit_Framework_TestCase
public function testConfigMode()
{
$config = array(
'query' => 'text:mykeyword',
'sort' => array('score' => 'asc'),
'query' => 'text:mykeyword',
'sort' => array('score' => 'asc'),
'fields' => array('id', 'title', 'category'),
'rows' => 100,
'start' => 200,
'rows' => 100,
'start' => 200,
'filterquery' => array(
array('key' => 'pub', 'tag' => array('pub'), 'query' => 'published:true'),
'online' => array('tag' => 'onl', 'query' => 'online:true')
......
......@@ -47,7 +47,7 @@ class DistributedSearchTest extends \PHPUnit_Framework_TestCase
$component->addShards(
array(
'shard2' => 'localhost:8983/solr/shard2',
'shard3' => 'localhost:8983/solr/shard3'
'shard3' => 'localhost:8983/solr/shard3',
)
);
$component->setShardRequestHandler('dummy');
......@@ -74,7 +74,7 @@ class DistributedSearchTest extends \PHPUnit_Framework_TestCase
$component->addCollections(
array(
'collection2' => $url.'2',
'collection3' => $url.'3'
'collection3' => $url.'3',
)
);
......
......@@ -107,7 +107,7 @@ class FacetSetTest extends \PHPUnit_Framework_TestCase
'end' => 100,
'gap' => 10,
'other' => 'all',
'include' => 'outer'
'include' => 'outer',
)
)
);
......@@ -135,7 +135,7 @@ class FacetSetTest extends \PHPUnit_Framework_TestCase
'field' => 'price',
'start' => '1',
'end' => 100,
'gap' => 10
'gap' => 10,
)
)
);
......@@ -193,7 +193,7 @@ class FacetSetTest extends \PHPUnit_Framework_TestCase
array(
'key' => 'f1',
'fields' => 'cat, inStock',
'mincount' => 123
'mincount' => 123,
)
)
);
......
......@@ -58,7 +58,8 @@ class SpellcheckTest extends \PHPUnit_Framework_TestCase
'origFreq' => 0,
'suggestion' => array (
0 => array (
'word' => 'dell', 'freq' => 1
'word' => 'dell',
'freq' => 1,
),
),
),
......@@ -71,7 +72,7 @@ class SpellcheckTest extends \PHPUnit_Framework_TestCase
'suggestion' => array (
0 => array (
'word' => 'ultrasharp',
'freq' => 1
'freq' => 1,
),
),
),
......@@ -88,7 +89,7 @@ class SpellcheckTest extends \PHPUnit_Framework_TestCase
0 => 'delll',
1 => 'dell',
2 => 'ultrashar',
3 => 'ultrasharp'
3 => 'ultrasharp',
),
),
8 => 'collation',
......@@ -102,10 +103,9 @@ class SpellcheckTest extends \PHPUnit_Framework_TestCase
0 => 'delll',
1 => 'dell',
2 => 'ultrashar',
3 => 'ultrasharp'
3 => 'ultrasharp',
),
),
)
)
);
......@@ -145,7 +145,7 @@ class SpellcheckTest extends \PHPUnit_Framework_TestCase
'suggestion' => array (
0 => array (
'word' => 'ultrasharp',
'freq' => 1
'freq' => 1,
),
),
),
......@@ -195,11 +195,11 @@ class SpellcheckTest extends \PHPUnit_Framework_TestCase
'suggestion' => array (
0 => array (
'word' => 'ultrasharp',
'freq' => 2
'freq' => 2,
),
1 => array (
'word' => 'ultrasharpy',
'freq' => 1
'freq' => 1,
),
),
),
......
......@@ -46,7 +46,7 @@ class ResponseParserTest extends \PHPUnit_Framework_TestCase
array('fieldA' => 1, 'fieldB' => 'Test'),
array('fieldA' => 2, 'fieldB' => 'Test2')
),
'numFound' => 503
'numFound' => 503,
),
'responseHeader' => array(
'status' => 1,
......@@ -92,7 +92,7 @@ class ResponseParserTest extends \PHPUnit_Framework_TestCase
array('fieldA' => 1, 'fieldB' => 'Test'),
array('fieldA' => 2, 'fieldB' => 'Test2')
),
'numFound' => 503
'numFound' => 503,
),
'responseHeader' => array(
'status' => 1,
......
......@@ -56,11 +56,11 @@ class SuggestionTest extends \PHPUnit_Framework_TestCase
$this->words = array(
array(
'word' => 'dummyword',
'freq' => 5
'freq' => 5,
),
array(
'word' => 'secondword',
'freq' => 1
'freq' => 1,
)
);
......
......@@ -64,7 +64,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
public function testConfigMode()
{
$options = array(
'handler' => 'myHandler',
'handler' => 'myHandler',
'resultclass' => 'myResult',
'command' => array(
'key1' => array(
......
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