mirror of
https://github.com/php/pecl-search_engine-solr.git
synced 2026-03-23 22:52:07 +01:00
SolrParams::getParam test
This commit is contained in:
24
tests/192.solrparams_getparam.phpt
Normal file
24
tests/192.solrparams_getparam.phpt
Normal file
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
SolrParams::getParam()
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$params = new SolrModifiableParams();
|
||||
|
||||
$params
|
||||
->set('q', 'lucene')
|
||||
->addParam('fq', 'popularity:[10 TO *]')
|
||||
->addParam('fq', 'section:0')
|
||||
;
|
||||
|
||||
var_dump($params->get('fq'));
|
||||
var_dump($params->get('q'));
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(20) "popularity:[10 TO *]"
|
||||
[1]=>
|
||||
string(9) "section:0"
|
||||
}
|
||||
string(6) "lucene"
|
||||
Reference in New Issue
Block a user