예제 #1
0
 public function testConfigMode()
 {
     $options = array('waitflush' => true, 'waitsearcher' => false, 'expungedeletes' => true);
     $command = new Solarium_Query_Update_Command_Commit($options);
     $this->assertEquals(true, $command->getWaitFlush());
     $this->assertEquals(false, $command->getWaitSearcher());
     $this->assertEquals(true, $command->getExpungeDeletes());
 }
예제 #2
0
 /**
  * Build XML for a commit command
  *
  * @param Solarium_Query_Update_Command_Commit $command
  * @return string
  */
 public function buildCommitXml($command)
 {
     $xml = '<commit';
     $xml .= $this->boolAttrib('waitFlush', $command->getWaitFlush());
     $xml .= $this->boolAttrib('waitSearcher', $command->getWaitSearcher());
     $xml .= $this->boolAttrib('expungeDeletes', $command->getExpungeDeletes());
     $xml .= '/>';
     return $xml;
 }