public function testConfigMode() { $options = array('softcommit' => true, 'waitsearcher' => false, 'expungedeletes' => true); $command = new Commit($options); $this->assertEquals(true, $command->getSoftCommit()); $this->assertEquals(false, $command->getWaitSearcher()); $this->assertEquals(true, $command->getExpungeDeletes()); }
/** * Build XML for a commit command * * @param Query\Command\Commit $command * @return string */ public function buildCommitXml($command) { $xml = '<commit'; $xml .= $this->boolAttrib('softCommit', $command->getSoftCommit()); $xml .= $this->boolAttrib('waitSearcher', $command->getWaitSearcher()); $xml .= $this->boolAttrib('expungeDeletes', $command->getExpungeDeletes()); $xml .= '/>'; return $xml; }