Annotation of embedaddon/php/ext/xmlwriter/tests/OO_001.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: XMLWriter: libxml2 XML Writer, file buffer, flush
3: --SKIPIF--
4: <?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
5: --FILE--
6: <?php
1.1.1.2 ! misho 7: /* $Id$ */
1.1 misho 8:
9: $doc_dest = '001.xml';
10: $xw = new XMLWriter();
11: $xw->openUri($doc_dest);
12: $xw->startDocument('1.0', 'UTF-8', 'standalonearg');
13: $xw->startElement("tag1");
14: $xw->endDocument();
15:
16: // Force to write and empty the buffer
17: $output_bytes = $xw->flush(true);
18: echo file_get_contents($doc_dest);
19: unset($xw);
20: unlink('001.xml');
21: ?>
22: ===DONE===
23: --EXPECT--
24: <?xml version="1.0" encoding="UTF-8" standalone="standalonearg"?>
25: <tag1/>
26: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>