xref: /PHP-5.3/ext/xmlwriter/tests/OO_002.phpt (revision bcd9356d)
1--TEST--
2XMLWriter: libxml2 XML Writer, membuffer, flush
3--SKIPIF--
4<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
5--FILE--
6<?php
7/* $Id$ */
8
9$xw = new XMLWriter();
10$xw->openMemory();
11$xw->startDocument('1.0', 'UTF-8', 'standalone');
12$xw->startElement("tag1");
13$xw->endDocument();
14
15// Force to write and empty the buffer
16echo $xw->flush(true);
17?>
18===DONE===
19--EXPECT--
20<?xml version="1.0" encoding="UTF-8" standalone="standalone"?>
21<tag1/>
22===DONE===
23