diff options
author | Rob Richards <rrichards@php.net> | 2005-12-07 05:09:33 +0000 |
---|---|---|
committer | Rob Richards <rrichards@php.net> | 2005-12-07 05:09:33 +0000 |
commit | 5b561a6df344293e327b260ec43543f7507d14fb (patch) | |
tree | 0215a5b2ad30e83ccc951518763f9fc10f3b448f /ext/xmlwriter/tests | |
parent | 2796160d15463a04acd7088fea379593d2c9caa0 (diff) | |
download | php-git-5b561a6df344293e327b260ec43543f7507d14fb.tar.gz |
MFH: fix res parameter typos
- add test
Diffstat (limited to 'ext/xmlwriter/tests')
-rw-r--r-- | ext/xmlwriter/tests/OO_006.phpt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/xmlwriter/tests/OO_006.phpt b/ext/xmlwriter/tests/OO_006.phpt new file mode 100644 index 0000000000..debaa17b47 --- /dev/null +++ b/ext/xmlwriter/tests/OO_006.phpt @@ -0,0 +1,28 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, startDTD/writeElementNS +--SKIPIF-- +<?php +if (!extension_loaded("xmlwriter")) die("skip"); +if (!function_exists("xmlwriter_start_comment")) die("skip: libxml2 2.6.7+ required"); +?> +--FILE-- +<?php +/* $Id$ */ + +$doc_dest = '001.xml'; +$xw = new XMLWriter(); +$xw->openUri($doc_dest); +$xw->startDtd('foo', NULL, 'urn:bar'); +$xw->endDtd(); +$xw->startElement('foo'); +$xw->writeElementNS('foo', 'bar', 'urn:foo', 'dummy content'); +$xw->endElement(); + +// Force to write and empty the buffer +$output_bytes = $xw->flush(true); +echo file_get_contents($doc_dest); +unset($xw); +unlink('001.xml'); +?> +--EXPECT-- +<!DOCTYPE foo SYSTEM "urn:bar"><foo><foo:bar xmlns:foo="urn:foo">dummy content</foo:bar></foo> |