php-src/ext/xmlwriter/tests/OO_001.phpt

27 lines
578 B
Plaintext
Raw Normal View History

2005-06-23 11:29:03 +00:00
--TEST--
XMLWriter: libxml2 XML Writer, file buffer, flush
--SKIPIF--
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
--FILE--
<?php
/* $Id$ */
$doc_dest = '001.xml';
$xw = new XMLWriter();
$xw->openUri($doc_dest);
2005-08-06 18:23:40 +00:00
$xw->startDocument('1.0', 'UTF-8', 'standalonearg');
2005-06-23 11:29:03 +00:00
$xw->startElement("tag1");
$xw->endDocument();
// Force to write and empty the buffer
$output_bytes = $xw->flush(true);
echo file_get_contents($doc_dest);
2005-08-06 18:23:40 +00:00
unset($xw);
2005-06-23 11:29:03 +00:00
unlink('001.xml');
?>
2005-07-03 09:10:41 +00:00
===DONE===
2005-06-23 11:29:03 +00:00
--EXPECT--
2005-08-06 18:23:40 +00:00
<?xml version="1.0" encoding="UTF-8" standalone="standalonearg"?>
2005-06-23 11:29:03 +00:00
<tag1/>
2005-07-03 09:10:41 +00:00
===DONE===