blob: a32a9696a6461e0b7da90e022b1fd61d5f9dc83a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
--TEST--
xmlwriter_start/end_attribute()
--SKIPIF--
<?php
if (!extension_loaded("xmlwriter")) die("skip");
?>
--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
|