summaryrefslogtreecommitdiff
path: root/ext/xmlwriter/tests
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-08-09 18:37:39 +0000
committerAntony Dovgal <tony2001@php.net>2006-08-09 18:37:39 +0000
commit051248b02115167787b5b530b9ec1f34a84b5c8b (patch)
tree05daa878c6d740c1fa5d440d377e26758eb61ba8 /ext/xmlwriter/tests
parent4fef78869b2291fe9113007cf7b652144fda15b7 (diff)
downloadphp-git-051248b02115167787b5b530b9ec1f34a84b5c8b.tar.gz
wrong directory
Diffstat (limited to 'ext/xmlwriter/tests')
-rw-r--r--ext/xmlwriter/tests/010.phpt41
1 files changed, 41 insertions, 0 deletions
diff --git a/ext/xmlwriter/tests/010.phpt b/ext/xmlwriter/tests/010.phpt
new file mode 100644
index 0000000000..89439dc222
--- /dev/null
+++ b/ext/xmlwriter/tests/010.phpt
@@ -0,0 +1,41 @@
+--TEST--
+xmlwriter_start/end_attribute()
+--FILE--
+<?php
+
+$file = dirname(__FILE__).'/010.tmp';
+
+$xw = xmlwriter_open_uri($file);
+
+var_dump(xmlwriter_start_element($xw, "tag"));
+var_dump(xmlwriter_start_attribute($xw, "attr"));
+var_dump(xmlwriter_end_attribute($xw));
+var_dump(xmlwriter_start_attribute($xw, "-1"));
+var_dump(xmlwriter_end_attribute($xw));
+var_dump(xmlwriter_start_attribute($xw, "\""));
+var_dump(xmlwriter_end_attribute($xw));
+var_dump(xmlwriter_end_element($xw));
+
+unset($xw);
+
+var_dump(file_get_contents($file));
+
+@unlink($file);
+
+echo "Done\n";
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+bool(true)
+
+Warning: xmlwriter_start_attribute(): Invalid Attribute Name in %s on line %d
+bool(false)
+bool(false)
+
+Warning: xmlwriter_start_attribute(): Invalid Attribute Name in %s on line %d
+bool(false)
+bool(false)
+bool(true)
+string(14) "<tag attr=""/>"
+Done