Annotation of embedaddon/php/ext/xmlwriter/tests/010.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: xmlwriter_start/end_attribute()
! 3: --SKIPIF--
! 4: <?php
! 5: if (!extension_loaded("xmlwriter")) die("skip");
! 6: ?>
! 7: --FILE--
! 8: <?php
! 9:
! 10: $file = dirname(__FILE__).'/010.tmp';
! 11:
! 12: $xw = xmlwriter_open_uri($file);
! 13:
! 14: var_dump(xmlwriter_start_element($xw, "tag"));
! 15: var_dump(xmlwriter_start_attribute($xw, "attr"));
! 16: var_dump(xmlwriter_end_attribute($xw));
! 17: var_dump(xmlwriter_start_attribute($xw, "-1"));
! 18: var_dump(xmlwriter_end_attribute($xw));
! 19: var_dump(xmlwriter_start_attribute($xw, "\""));
! 20: var_dump(xmlwriter_end_attribute($xw));
! 21: var_dump(xmlwriter_end_element($xw));
! 22:
! 23: unset($xw);
! 24:
! 25: var_dump(file_get_contents($file));
! 26:
! 27: @unlink($file);
! 28:
! 29: echo "Done\n";
! 30: ?>
! 31: --EXPECTF--
! 32: bool(true)
! 33: bool(true)
! 34: bool(true)
! 35:
! 36: Warning: xmlwriter_start_attribute(): Invalid Attribute Name in %s on line %d
! 37: bool(false)
! 38: bool(false)
! 39:
! 40: Warning: xmlwriter_start_attribute(): Invalid Attribute Name in %s on line %d
! 41: bool(false)
! 42: bool(false)
! 43: bool(true)
! 44: string(14) "<tag attr=""/>"
! 45: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>