1--TEST--
2SolrClient::optimize() - Testing optimize
3--SKIPIF--
4<?php
5include 'skip.if.server_not_configured.inc';
6?>
7--FILE--
8<?php
9
10require_once "bootstrap.inc";
11
12$options = array
13(
14    'hostname' => SOLR_SERVER_HOSTNAME,
15    'login'    => SOLR_SERVER_USERNAME,
16    'password' => SOLR_SERVER_PASSWORD,
17    'port'     => SOLR_SERVER_PORT,
18	'path'	   => SOLR_SERVER_PATH
19);
20
21$client = new SolrClient($options);
22$updateResponse = $client->optimize();
23print $updateResponse->getRawRequest();
24$updateResponse = $client->optimize(4,true,false);
25print $updateResponse->getRawRequest();
26?>
27--EXPECTF--
28<?xml version="1.0" encoding="UTF-8"?>
29<optimize maxSegments="1" softCommit="false" waitSearcher="true"/>
30<?xml version="1.0" encoding="UTF-8"?>
31<optimize maxSegments="4" softCommit="true" waitSearcher="false"/>
32