xref: /PHP-5.3/ext/xmlwriter/tests/OO_001.phpt (revision bcd9356d)
1--TEST--
2XMLWriter: libxml2 XML Writer, file buffer, flush
3--SKIPIF--
4<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
5--FILE--
6<?php
7/* $Id$ */
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);
18echo file_get_contents($doc_dest);
19unset($xw);
20unlink('001.xml');
21?>
22===DONE===
23--EXPECT--
24<?xml version="1.0" encoding="UTF-8" standalone="standalonearg"?>
25<tag1/>
26===DONE===
27