summaryrefslogtreecommitdiff
path: root/ext/xmlwriter/tests/002.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/xmlwriter/tests/002.phpt')
-rw-r--r--ext/xmlwriter/tests/002.phpt22
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/xmlwriter/tests/002.phpt b/ext/xmlwriter/tests/002.phpt
new file mode 100644
index 0000000..f2537a4
--- /dev/null
+++ b/ext/xmlwriter/tests/002.phpt
@@ -0,0 +1,22 @@
+--TEST--
+XMLWriter: libxml2 XML Writer, membuffer, flush
+--SKIPIF--
+<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
+--FILE--
+<?php
+/* $Id$ */
+
+$doc_dest = '001.xml';
+$xw = xmlwriter_open_memory($doc_dest);
+xmlwriter_start_document($xw, '1.0', 'UTF-8');
+xmlwriter_start_element($xw, "tag1");
+xmlwriter_end_document($xw);
+
+// Force to write and empty the buffer
+echo xmlwriter_flush($xw, true);
+?>
+===DONE===
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<tag1/>
+===DONE===