xref: /php-src/ext/xmlwriter/tests/002.phpt (revision 74859783)
1--TEST--
2XMLWriter: libxml2 XML Writer, membuffer, flush
3--EXTENSIONS--
4xmlwriter
5--FILE--
6<?php
7
8$xw = xmlwriter_open_memory();
9xmlwriter_start_document($xw, '1.0', 'UTF-8');
10xmlwriter_start_element($xw, "tag1");
11xmlwriter_end_document($xw);
12
13// Force to write and empty the buffer
14echo xmlwriter_flush($xw, true);
15?>
16--EXPECT--
17<?xml version="1.0" encoding="UTF-8"?>
18<tag1/>
19