diff options
author | Pierre Joye <pajoye@php.net> | 2005-06-23 11:29:03 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2005-06-23 11:29:03 +0000 |
commit | 58cb6bb07f963cc3c733181f42f39a307de235e9 (patch) | |
tree | 9c4c01606d3bcf75dfa522279304f30f8a9c3de1 /ext/xmlwriter/tests/001.phpt | |
parent | 8c1c4865acf12fdac68c0cb5a420f3253bf82410 (diff) | |
download | php-git-58cb6bb07f963cc3c733181f42f39a307de235e9.tar.gz |
- initial tests
Diffstat (limited to 'ext/xmlwriter/tests/001.phpt')
-rw-r--r-- | ext/xmlwriter/tests/001.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/xmlwriter/tests/001.phpt b/ext/xmlwriter/tests/001.phpt new file mode 100644 index 0000000000..2c9f96aa42 --- /dev/null +++ b/ext/xmlwriter/tests/001.phpt @@ -0,0 +1,24 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, file buffer, flush +--SKIPIF-- +<?php if (!extension_loaded("xmlwriter")) print "skip"; ?> +--FILE-- +<?php +/* $Id$ */ + +$doc_dest = '001.xml'; +$xw = xmlwriter_open_uri($doc_dest); +xmlwriter_start_document($xw, '1.0', 'utf8'); +xmlwriter_start_element($xw, "tag1"); +xmlwriter_end_document($xw); + +// Force to write and empty the buffer +$output_bytes = xmlwriter_flush($xw, true); +echo file_get_contents($doc_dest); +unlink('001.xml'); +echo "---Done---\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="utf8"?> +<tag1/> +---Done--- |