Annotation of embedaddon/php/ext/xmlwriter/tests/001.phpt, revision 1.1.1.1
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
7: /* $Id: 001.phpt 201860 2005-12-02 02:05:26Z iliaa $ */
8:
9: $doc_dest = '001.xml';
10: $xw = xmlwriter_open_uri($doc_dest);
11: xmlwriter_start_document($xw, '1.0', 'UTF-8');
12: xmlwriter_start_element($xw, "tag1");
13: xmlwriter_end_document($xw);
14:
15: // Force to write and empty the buffer
16: $output_bytes = xmlwriter_flush($xw, true);
17: echo file_get_contents($doc_dest);
18: unset($xw);
19: unlink('001.xml');
20: ?>
21: ===DONE===
22: --EXPECT--
23: <?xml version="1.0" encoding="UTF-8"?>
24: <tag1/>
25: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>