public function testBuildDeleteXmlIdAndQuerySpecialChars()
 {
     $command = new Solarium_Query_Update_Command_Delete();
     $command->addId('special<char>id');
     $command->addQuery('id:special<char>id');
     $this->assertEquals('<delete><id>special&lt;char&gt;id</id><query>id:special&lt;char&gt;id</query></delete>', $this->_builder->buildDeleteXml($command));
 }
Example #2
0
 /**
  * Convenience method to add a delete by ID command
  *
  * If you need more control, like choosing a key for the command you need to
  * create you own command instance and use the add method.
  *
  * @param int|string $id
  * @return Solarium_Query_Update Provides fluent interface
  */
 public function addDeleteById($id)
 {
     $delete = new Solarium_Query_Update_Command_Delete();
     $delete->addId($id);
     return $this->add(null, $delete);
 }