/** * Test creation of XML document. * * @return void */ public function testAsXML() { $document = new DeleteDocument(); $document->addKey('foobar'); $document->addQuery('timestamp:[* TO NOW-12HOUR]'); $xml = $document->asXML(); $this->assertXmlStringEqualsXmlString('<delete><id>foobar</id><query>timestamp:[* TO NOW-12HOUR]</query></delete>', $xml); }