public function testBuildComponentWithCollections()
 {
     $builder = new RequestBuilder();
     $request = new Request();
     $component = new Component();
     $component->addCollection('collection1', 'localhost:8983/solr/collection1');
     $component->addCollections(array('collection2' => 'localhost:8983/solr/collection2', 'collection3' => 'localhost:8983/solr/collection3'));
     $request = $builder->buildComponent($component, $request);
     $this->assertEquals(array('collection' => 'localhost:8983/solr/collection1,localhost:8983/solr/collection2,localhost:8983/solr/collection3'), $request->getParams());
 }
 public function testBuildComponentWithReplicasAndShard()
 {
     $builder = new RequestBuilder();
     $request = new Request();
     $url = 'localhost:8983/solr/replica';
     $component = new Component();
     $component->addShard('shard1', 'localhost:8983/solr/shard1');
     $component->addReplicas(array('replica2' => $url . '2', 'replica3' => $url . '3'));
     $request = $builder->buildComponent($component, $request);
     $this->assertEquals(array('shards' => 'localhost:8983/solr/shard1,' . $url . '2|' . $url . '3'), $request->getParams());
 }