| Current File : /home/mmdealscpanel/yummmdeals.com/alt-php80-pecl-solr_2.7.0-1.el8.tar |
tests/060.solrquery_comon_query_params.phpt 0000644 00000003033 15041376123 0015140 0 ustar 00 --TEST--
SolrQuery - testing CommonQueryParameters
--FILE--
<?php
$query = new SolrQuery();
ob_start();
var_dump(
$query->getQuery(),
$query->getTimeAllowed(),
$query->getStart(),
$query->getRows(),
$query->getFields(),
$query->getFilterQueries(),
$query->getSortFields()
);
$nullOutput = ob_get_clean();
$query->setParam('a', 1);
$query->setParam('b', 2);
$query->setParam('c', 3);
$query->setStart(4)->setQuery('solr')->setTimeAllowed(500)->setRows(17);
$query->addField('israel')->addField('joshua')->addField('june');
$query->addSortField('cat', SolrQuery::ORDER_ASC);
$query->addFilterQuery('solr')->addFilterQuery('solr1')->addFilterQuery('solr2');
$query
->setShowDebugInfo(true)
->setExplainOther('id:SOL*')
->setOmitHeader(false)
->setEchoHandler(true)
->setEchoParams('all')
;
echo $query . PHP_EOL . PHP_EOL;
var_dump(
$query->getQuery(),
$query->getTimeAllowed(),
$query->getStart(),
$query->getRows(),
$query->getFields(),
$query->getFilterQueries(),
$query->getSortFields()
);
echo $nullOutput;
?>
--EXPECT--
a=1&b=2&c=3&start=4&q=solr&timeAllowed=500&rows=17&fl=israel,joshua,june&sort=cat asc&fq=solr&fq=solr1&fq=solr2&debugQuery=true&explainOther=id:SOL*&omitHeader=false&echoHandler=true&echoParams=all
string(4) "solr"
int(500)
int(4)
int(17)
array(3) {
[0]=>
string(6) "israel"
[1]=>
string(6) "joshua"
[2]=>
string(4) "june"
}
array(3) {
[0]=>
string(4) "solr"
[1]=>
string(5) "solr1"
[2]=>
string(5) "solr2"
}
array(1) {
[0]=>
string(7) "cat asc"
}
NULL
NULL
NULL
NULL
NULL
NULL
NULL tests/110.solrdismaxquery.phpt 0000644 00000004003 15041376123 0012355 0 ustar 00 --TEST--
SolrDisMaxQuery - Methods
--FILE--
<?php
$dismaxQuery = new SolrDisMaxQuery("lucene");
$dismaxQuery
->addPhraseField('source', 55)
->addPhraseField('cat', 3, 1)
->addPhraseField('third', 4, 1)
->removePhraseField('third')
->addPhraseField('fourth', 0.5)
->addPhraseField('fifth',5.2, 7.8)
->setQueryAlt('*:*')
->addQueryField("price")
->addQueryField("location", 4)
->setPhraseSlop(2)
->setQueryPhraseSlop(3)
->setTieBreaker(0.5)
->setMinimumMatch(2)
;
// reverse
echo $dismaxQuery.PHP_EOL;
$dismaxQuery = new SolrDisMaxQuery("lucene");
$dismaxQuery
->addQueryField("location", 4)
->addQueryField("price")
->addQueryField("sku")
->addQueryField("title",3.4)
->addPhraseField('cat', 3, 1)
->addPhraseField('third', 4, 1)
->addPhraseField('source', 55)
;
echo $dismaxQuery.PHP_EOL;
$dismaxQuery->setPhraseFields('source^55 cat~1^3');
echo $dismaxQuery.PHP_EOL;
$dismaxQuery = new SolrDisMaxQuery('lucene');
$dismaxQuery->addPhraseField('first', 3, 1)
->addPhraseField('second', 4, 1)
->addPhraseField('cat', 55);
echo $dismaxQuery. PHP_EOL;
echo $dismaxQuery->removePhraseField('second').PHP_EOL;
$dismaxQuery = new SolrDisMaxQuery('lucene');
$dismaxQuery->addQueryField('first', 3)
->addQueryField('second', 0.2)
->addQueryField('cat');
echo $dismaxQuery. PHP_EOL;
echo $dismaxQuery->removeQueryField('second').PHP_EOL;
$dismaxQuery = new SolrDisMaxQuery('lucene');
$dismaxQuery->setPhraseSlop(4);
echo $dismaxQuery.PHP_EOL;
?>
--EXPECTF--
q=lucene&defType=%s&pf=source^55 cat~1^3 fourth^0.5 fifth~7.8^5.2&q.alt=*:*&qf=price location^4&ps=2&qs=3&tie=0.5&mm=2
q=lucene&defType=%s&qf=location^4 price sku title^3.4&pf=cat~1^3 third~1^4 source^55
Notice: SolrDisMaxQuery::setPhraseFields(): Parameter pf value(s) was overwritten by this call in %s on line %d
q=lucene&defType=%s&qf=location^4 price sku title^3.4&pf=source^55 cat~1^3
q=lucene&defType=%s&pf=first~1^3 second~1^4 cat^55
q=lucene&defType=%s&pf=first~1^3 cat^55
q=lucene&defType=%s&qf=first^3 second^0.2 cat
q=lucene&defType=%s&qf=first^3 cat
q=lucene&defType=%s&ps=4 tests/019.solrclient_clone.phpt 0000644 00000001240 15041376124 0012451 0 ustar 00 --TEST--
SolrClient::__clone() - expect exception on clone
--SKIPIF--
<?php require_once 'skip.if.server_not_configured.inc'; ?>
--FILE--
<?php
require_once "bootstrap.inc";
$options = array
(
'hostname' => SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH
);
$client = new SolrClient($options);
try {
$failing = clone $client;
} catch (SolrIllegalOperationException $e) {
echo sprintf("Exception %d: %s", $e->getCode(), $e->getMessage()) . PHP_EOL;
}
?>
--EXPECTF--
Exception 4001: Cloning of SolrClient objects is currently not supported tests/150.solrcollapsefunction.phpt 0000644 00000001531 15041376124 0013362 0 ustar 00 --TEST--
SolrCollapseFunction - string conversion
--FILE--
<?php
$func = new SolrCollapseFunction('field');
$func->setField('field2');
$func->setMax('max');
$func->setMin('min');
$func->setSize(1000);
$func->setHint('hint');
$func->setNullPolicy(SolrCollapseFunction::NULLPOLICY_EXPAND);
var_dump($func->getField());
var_dump($func->getMax());
var_dump($func->getMin());
var_dump($func->getSize());
var_dump($func->getHint());
var_dump($func->getNullPolicy());
var_dump((string)$func);
$func->setMax('with space');
var_dump((string)$func);
?>
--EXPECTF--
string(6) "field2"
string(3) "max"
string(3) "min"
string(4) "1000"
string(4) "hint"
string(6) "expand"
string(78) "{!collapse field=field2 max=max min=min size=1000 hint=hint nullPolicy=expand}"
string(87) "{!collapse field=field2 max='with space' min=min size=1000 hint=hint nullPolicy=expand}"
tests/062.solrquery_date_facet_parameters.phpt 0000644 00000003704 15041376124 0015547 0 ustar 00 --TEST--
SolrQuery - Testing Date facet parameters
--FILE--
<?php
$query = new SolrQuery();
ob_start();
var_dump(
$query->getFacetDateFields(),
$query->getFacetDateStart(),
$query->getFacetDateStart('june'),
$query->getFacetDateEnd(),
$query->getFacetDateEnd('israel'),
$query->getFacetDateGap(),
$query->getFacetDateGap('june'),
$query->getFacetDateHardEnd(),
$query->getFacetDateHardEnd('june'),
$query->getFacetDateOther(),
$query->getFacetDateOther('june')
);
$nullOutput = ob_get_clean();
$query->addFacetDateField('israel')
->addFacetDateField('israel')
->removeFacetDateField('israel')
;
$query->setFacetDateStart('January')->setFacetDateStart('Feb', 'june');
$query->setFacetDateEnd('Jan')->setFacetDateEnd('Febr', 'israel');
$query->setFacetDateGap('AOL')->setFacetDateGap('YAHOO', 'june');
$query->setFacetDateHardEnd(1)->setFacetDateHardEnd(0,'june');
$query->addFacetDateOther('Google')
->addFacetDateOther('Yahoos','june')
->addFacetDateOther('removeme')
->removeFacetDateOther('removeme');
echo $query. PHP_EOL . PHP_EOL;
var_dump(
$query->getFacetDateFields(),
$query->getFacetDateStart(),
$query->getFacetDateStart('june'),
$query->getFacetDateEnd(),
$query->getFacetDateEnd('israel'),
$query->getFacetDateGap(),
$query->getFacetDateGap('june'),
$query->getFacetDateHardEnd(),
$query->getFacetDateHardEnd('june'),
$query->getFacetDateOther(),
$query->getFacetDateOther('june')
);
echo $nullOutput;
?>
--EXPECTF--
facet.date=israel&facet.date.start=January&f.june.facet.date.start=Feb&facet.date.end=Jan&f.israel.facet.date.end=Febr&facet.date.gap=AOL&f.june.facet.date.gap=YAHOO&facet.date.hardend=true&f.june.facet.date.hardend=false&f.june.facet.date.other=Yahoos
array(1) {
[0]=>
string(6) "israel"
}
string(7) "January"
string(3) "Feb"
string(3) "Jan"
string(4) "Febr"
string(3) "AOL"
string(5) "YAHOO"
bool(true)
bool(false)
NULL
array(1) {
[0]=>
string(6) "Yahoos"
}
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL tests/080.solrutils_escapequerychars.phpt 0000644 00000000523 15041376124 0014603 0 ustar 00 --TEST--
SolrUtils::escapeQueryChars() - Testing Lucene Reserved Characters
--FILE--
<?php
// + - && || ! ( ) { } [ ] ^ " ~ * ? : \
$queryString = '+a - q{ } [^test] || && () ^ " ~ * ? : \\ /';
$escaped = SolrUtils::escapeQueryChars($queryString);
echo $escaped;
?>
--EXPECTF--
\+a \- q\{ \} \[\^test\] \|| \&& \(\) \^ \" \~ \* \? \: \\ \/ tests/test.config.inc 0000644 00000004070 15041376124 0010630 0 ustar 00 <?php
$serverConfigured = getenv('SOLR_SERVER_CONFIGURED') ? (int)getenv('SOLR_SERVER_CONFIGURED') : false;
define('SOLR_SERVER_CONFIGURED', $serverConfigured);
define('ROOT_DIRECTORY', dirname(__FILE__));
define('EXAMPLE_RESPONSE_XML_1', ROOT_DIRECTORY . '/files/response_xml.1.xml');
define('EXAMPLE_RESPONSE_XML_2', ROOT_DIRECTORY . '/files/response_xml.2.xml');
define('EXAMPLE_RESPONSE_XML_3', ROOT_DIRECTORY . '/files/response_xml.3.xml');
define('EXAMPLE_RESPONSE_XML_4', ROOT_DIRECTORY . '/files/response_xml.4.xml');
define('EXTRACT_FILE_1', ROOT_DIRECTORY . '/files/extract_file.1.pdf');
/* Whether or not to run in secure mode */
define('SOLR_SECURE', false);
/* Domain name of the Solr server */
define('SOLR_SERVER_HOSTNAME', '127.0.0.1');
/* HTTP Port to connection */
define('SOLR_SERVER_PORT', ((SOLR_SECURE) ? 8443 : 8983));
/* SOLR CORE to test on */
define('SOLR_SERVER_PATH', 'solr/collection1');
/* used to test child documents */
define('SOLR_SERVER_STORE_PATH', 'solr/metal_store');
define('SOLR_SERVER_FILES_PATH', 'solr/myfiles');
/* HTTP Basic Authentication Username */
define('SOLR_SERVER_USERNAME', 'admin');
/* HTTP Basic Authentication password */
define('SOLR_SERVER_PASSWORD', 'changeit');
/* HTTP connection timeout */
/* This is maximum time in seconds allowed for the http data transfer operation. Default value is 30 seconds */
define('SOLR_SERVER_TIMEOUT', 10);
/* File name to a PEM-formatted private key + private certificate (concatenated in that order) */
define('SOLR_SSL_CERT', 'certs/combo.pem');
/* File name to a PEM-formatted private certificate only */
define('SOLR_SSL_CERT_ONLY', 'certs/solr.crt');
/* File name to a PEM-formatted private key */
define('SOLR_SSL_KEY', 'certs/solr.key');
/* Password for PEM-formatted private key file */
define('SOLR_SSL_KEYPASSWORD', 'StrongAndSecurePassword');
/* Name of file holding one or more CA certificates to verify peer with*/
define('SOLR_SSL_CAINFO', 'certs/cacert.crt');
/* Name of directory holding multiple CA certificates to verify peer with */
define('SOLR_SSL_CAPATH', 'certs/');
?>
tests/193.solrparams_getparams.phpt 0000644 00000000650 15041376124 0013350 0 ustar 00 --TEST--
SolrParams::getParams()
--FILE--
<?php
$params = new SolrModifiableParams();
$params
->set('q', 'lucene')
->addParam('fq', 'popularity:[10 TO *]')
->addParam('fq', 'section:0')
;
var_dump($params->getParams());
?>
--EXPECT--
array(2) {
["q"]=>
array(1) {
[0]=>
string(6) "lucene"
}
["fq"]=>
array(2) {
[0]=>
string(20) "popularity:[10 TO *]"
[1]=>
string(9) "section:0"
}
} tests/116.solrdismaxquery_boostfunction.phpt 0000644 00000000525 15041376124 0015345 0 ustar 00 --TEST--
SolrDisMaxQuery - setBoostFunction
--FILE--
<?php
$dismaxQuery = new SolrDisMaxQuery('lucene');
$boostRecentDocsFunction = "recip(ms(NOW,mydatefield),3.16e-11,1,1)";
$dismaxQuery->setBoostFunction($boostRecentDocsFunction);
echo $dismaxQuery.PHP_EOL;
?>
--EXPECTF--
q=lucene&defType=%s&bf=recip(ms(NOW,mydatefield),3.16e-11,1,1) tests/059.solrinputdocument_set_getfieldboost.phpt 0000644 00000000430 15041376124 0016502 0 ustar 00 --TEST--
SolrInputDocument::getFieldBoost
--FILE--
<?php
require_once "bootstrap.inc";
$doc = new SolrInputDocument();
$doc->addField('id', 123);
$doc->addField('cat', 'Software');
$doc->setFieldBoost('cat', 2.1);
var_dump($doc->getFieldBoost('cat'));
?>
--EXPECT--
float(2.1) tests/103.solrresponse_get_array_response.phpt 0000644 00000001464 15041376124 0015626 0 ustar 00 --TEST--
SolrResponse::getArrayResponse - For All response writers
--SKIPIF--
<?php
include 'skip.if.server_not_configured.inc';
?>
--FILE--
<?php
require_once "bootstrap.inc";
$options = array (
'hostname' => SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient ( $options );
$testArrayResponse = function ($writer) use ($client){
$client->setResponseWriter($writer);
$q = new SolrQuery("lucene");
$response = $client->query ( $q );
$arrayResponse = $response->getArrayResponse();
return is_array($arrayResponse);
};
var_dump($testArrayResponse('phps'));
var_dump($testArrayResponse('xml'));
var_dump($testArrayResponse('json'));
?>
--EXPECTF--
bool(true)
bool(true)
bool(true) tests/106.solrresponse_child_doc_response_solrdoc.phpt 0000644 00000005624 15041376124 0017313 0 ustar 00 --TEST--
SolrDocument - Response parsed as SolrDocument with child documents
--FILE--
<?php
require_once "bootstrap.inc";
$fixtureXml = file_get_contents(EXAMPLE_RESPONSE_XML_2);
$response = SolrUtils::digestXmlResponse($fixtureXml, SolrResponse::PARSE_SOLR_DOC);
foreach($response->response->docs as $doc)
{
echo '--- doc start ---'.PHP_EOL;
print_r($doc->toArray());
if ($doc->hasChildDocuments())
{
foreach ($doc->getChildDocuments() as $child)
{
print_r($child->toArray());
}
}
echo '--- doc end ---'.PHP_EOL;
}
?>
--EXPECT--
--- doc start ---
Array
(
[document_boost] => 0
[field_count] => 1
[fields] => Array
(
[0] => SolrDocumentField Object
(
[name] => id
[boost] => 0
[values] => Array
(
[0] => parent_1
)
)
)
)
Array
(
[document_boost] => 0
[field_count] => 1
[fields] => Array
(
[0] => SolrDocumentField Object
(
[name] => id
[boost] => 0
[values] => Array
(
[0] => CHILD_1_1
)
)
)
)
--- doc end ---
--- doc start ---
Array
(
[document_boost] => 0
[field_count] => 1
[fields] => Array
(
[0] => SolrDocumentField Object
(
[name] => id
[boost] => 0
[values] => Array
(
[0] => parent_2
)
)
)
)
Array
(
[document_boost] => 0
[field_count] => 1
[fields] => Array
(
[0] => SolrDocumentField Object
(
[name] => id
[boost] => 0
[values] => Array
(
[0] => CHILD_2_1
)
)
)
)
Array
(
[document_boost] => 0
[field_count] => 1
[fields] => Array
(
[0] => SolrDocumentField Object
(
[name] => id
[boost] => 0
[values] => Array
(
[0] => CHILD_2_2
)
)
)
)
--- doc end ---
--- doc start ---
Array
(
[document_boost] => 0
[field_count] => 1
[fields] => Array
(
[0] => SolrDocumentField Object
(
[name] => id
[boost] => 0
[values] => Array
(
[0] => not_a_parent_1
)
)
)
)
--- doc end ---
tests/007.solrclient_deleteByIds.phpt 0000644 00000002166 15041376124 0013553 0 ustar 00 --TEST--
SolrClient::deleteByIds() - Test deleting documents by an array of IDS
--SKIPIF--
<?php
include 'skip.if.server_not_configured.inc';
?>
--FILE--
<?php
require_once "bootstrap.inc";
$options = array
(
'hostname' => SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH
);
$client = new SolrClient($options);
$response = $client->deleteByIds(array('334455','334456'));
$client->commit();
print_r($response->getResponse());
try {
$client->deleteByIds(array(0));
} catch (SolrIllegalArgumentException $e) {
echo sprintf("Exception %d: %s", $e->getCode(), $e->getMessage()). PHP_EOL;
}
try {
$client->deleteByIds(array('334455', ''));
} catch (SolrIllegalArgumentException $e) {
echo sprintf("Exception %d: %s", $e->getCode(), $e->getMessage()). PHP_EOL;
}
?>
--EXPECTF--
SolrObject Object
(
[responseHeader] => SolrObject Object
(
[status] => %d
[QTime] => %d
)
)
Exception 4000: Id number 1 is not a valid string
Exception 4000: Id number 2 is not a valid string tests/016.solrclient_sendUpdateStream_file.phpt 0000644 00000001774 15041376124 0015631 0 ustar 00 --TEST--
SolrClient::sendUpdateStream - send SolrExtractRequest (file)
--SKIPIF--
<?php require_once 'skip.if.server_not_configured.inc'; ?>
--FILE--
<?php
require_once "bootstrap.inc";
$options = array (
'hostname' => SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_FILES_PATH,
);
$client = new SolrClient($options);
$extractParams = new SolrModifiableParams();
$extractParams
->set(SolrExtractRequest::LITERALS_PREFIX . 'id', 'doc1')
->set(SolrExtractRequest::CAPTURE_ELEMENTS, 'p')
->set(SolrExtractRequest::FIELD_MAPPING_PREFIX . 'p', 'text')
;
$extractRequest = SolrExtractRequest::createFromFile(EXTRACT_FILE_1, $extractParams);
$response = $client->sendUpdateStream($extractRequest);
$client->rollback();
echo $response->getHttpStatus() . PHP_EOL;
echo $response->getRequestUrl() . PHP_EOL;
?>
--EXPECTF--
200
http://%s/update/extract/?version=2.2&indent=on&wt=xml&literal.id=doc1&capture=p&fmap.p=text
tests/056.solrinputdocument_toArray.phpt 0000644 00000001611 15041376124 0014415 0 ustar 00 --TEST--
SolrInputDocument::toArray - Array conversion
--FILE--
<?php
require_once "bootstrap.inc";
$doc = new SolrInputDocument();
$doc->addField('field_1', 4, 3.4);
$doc->addField('field_2', 1);
print_r($doc->toArray());
?>
--EXPECT--
Array
(
[document_boost] => 0
[field_count] => 2
[fields] => Array
(
[0] => SolrDocumentField Object
(
[name] => field_1
[boost] => 3.4
[values] => Array
(
[0] => 4
)
)
[1] => SolrDocumentField Object
(
[name] => field_2
[boost] => 0
[values] => Array
(
[0] => 1
)
)
)
)
tests/053.solrinputdocument_getchilddocumentscount.phpt 0000644 00000001112 15041376124 0017543 0 ustar 00 --TEST--
SolrInputDocument::getChildDocumentsCount() - test
--FILE--
<?php
require_once "bootstrap.inc";
$doc = new SolrInputDocument();
$secondDoc = new SolrInputDocument();
$doc->addField('id', 1123);
$doc->addField('features', "PHP Client Side");
$doc->addField('features', "Fast development cycles");
$doc->cat = 'Information Technology';
$secondDoc->addField('cat', 'Lucene Search');
$secondDoc->cat = 'Custom Search';
$doc->addChildDocument($secondDoc);
var_dump($doc->getChildDocumentsCount());
var_dump($secondDoc->getChildDocumentsCount());
?>
--EXPECT--
int(1)
int(0) tests/bug_70495.phpt 0000644 00000001746 15041376124 0010143 0 ustar 00 --TEST--
Solr Bug #70495 - Failed to parse 500 error response when Solr it lacks msg JSON RW
--SKIPIF--
<?php require_once 'skip.if.server_not_configured.inc'; ?>
--FILE--
<?php
require_once "bootstrap.inc";
$options = array
(
'hostname' => SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
'wt' => 'json'
);
$client = new SolrClient($options);
$query = new SolrQuery('*:*');
$func = new SolrCollapseFunction('manu_id_s');
$func->setMax('sum(cscore(),field(manu_id_s))');
$func->setSize(100);
$func->setNullPolicy(SolrCollapseFunction::NULLPOLICY_EXPAND);
$query->collapse($func);
try {
$queryResponse = $client->query($query);
} catch (SolrServerException $e) {
printf("Exception code %d", $e->getCode());
assert(strlen($e->getMessage()) > 0, 'Exception message is empty');
}
?>
OK
--EXPECTF--
Exception code 500
OK tests/021.solrdocument_iterator.phpt 0000644 00000001766 15041376124 0013550 0 ustar 00 --TEST--
SolrDocument - checking Iterator interface implementation
--FILE--
<?php
require_once "bootstrap.inc";
$doc = new SolrDocument();
$doc->addField('id', 1123);
$doc->features = "PHP Client Side";
$doc->features = "Fast development cycles";
$doc['cat'] = 'Software';
$doc['cat'] = 'Custom Search';
$doc->cat = 'Information Technology';
foreach ($doc as $fieldname => $fieldvalues)
{
print "$fieldname\n";
print_r($fieldvalues);
}
?>
--EXPECT--
id
SolrDocumentField Object
(
[name] => id
[boost] => 0
[values] => Array
(
[0] => 1123
)
)
features
SolrDocumentField Object
(
[name] => features
[boost] => 0
[values] => Array
(
[0] => PHP Client Side
[1] => Fast development cycles
)
)
cat
SolrDocumentField Object
(
[name] => cat
[boost] => 0
[values] => Array
(
[0] => Software
[1] => Custom Search
[2] => Information Technology
)
)
tests/008.solrclient_rollback.phpt 0000644 00000001051 15041376124 0013140 0 ustar 00 --TEST--
SolrClient::rollback() - Testing rollback
--SKIPIF--
<?php
include 'skip.if.server_not_configured.inc';
?>
--FILE--
<?php
require_once "bootstrap.inc";
$options = array
(
'hostname' => SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH
);
$client = new SolrClient($options);
$updateResponse = $client->rollback();
print $updateResponse->getRawRequest();
?>
--EXPECTF--
<?xml version="1.0" encoding="UTF-8"?>
<rollback/>