mirror of
https://github.com/php/php-src.git
synced 2025-01-26 13:44:22 +08:00
Add missing SKIPIF sections to tests
This commit is contained in:
parent
f44f3a31cd
commit
cccb4e446e
@ -19,14 +19,13 @@ $xml = simplexml_load_string ($xml_str) ;
|
||||
$val = 1;
|
||||
|
||||
var_dump($val);
|
||||
$obj->pos["act_idx"] = $val;
|
||||
$xml->pos["act_idx"] = $val;
|
||||
var_dump($val) ;
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
int(1)
|
||||
|
||||
Strict Standards: Creating default object from empty value in %s on line %d
|
||||
int(1)
|
||||
Done
|
||||
===DONE===
|
||||
|
@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #42369 (Implicit conversion to string leaks memory)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('simplexml')) echo 'skip simplexml extension is not loaded'; >
|
||||
<?php if (!extension_loaded('simplexml')) echo 'skip simplexml extension is not loaded'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$xml = '<?xml version="1.0" encoding="utf-8"?>';
|
||||
@ -17,9 +17,10 @@ Bug #42369 (Implicit conversion to string leaks memory)
|
||||
md5($x->x);
|
||||
}
|
||||
|
||||
echo 'done' . PHP_EOL;
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
explicit conversion
|
||||
no conversion
|
||||
done
|
||||
===DONE===
|
||||
|
@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #43221 (SimpleXML adding default namespace in addAttribute)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$xml = simplexml_load_string('<?xml version="1.0" encoding="utf-8"?><root />');
|
||||
@ -9,7 +11,10 @@ $n->addAttribute("c", "d", "http://bar.com");
|
||||
$n->addAttribute("foo:e", "f", "http://bar.com");
|
||||
print_r($xml->asXml());
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Warning: SimpleXMLElement::addAttribute(): Attribute requires prefix for namespace in %sbug43221.php on line %d
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root><node xmlns:foo="http://bar.com" a="b" foo:e="f">value</node></root>
|
||||
<root><node xmlns:foo="http://bar.com" a="b" foo:e="f">value</node></root>
|
||||
===DONE===
|
||||
|
@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #44478 (Inconsistent behaviour when assigning new nodes)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$xml_element = new simpleXMLElement('<root></root>');
|
||||
@ -15,6 +17,7 @@ print $xml_element->node2."\n";
|
||||
print $xml_element->asXML();
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
a & b
|
||||
a & b
|
||||
@ -22,3 +25,5 @@ a & b
|
||||
a & b
|
||||
<?xml version="1.0"?>
|
||||
<root><node1>a &#38; b</node1><node2>a & b</node2></root>
|
||||
===DONE===
|
||||
|
@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #45553 (Using XPath to return values for attributes with a namespace does not work)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$xml =<<<XML
|
||||
@ -23,9 +25,12 @@ echo $atts[0] . "\n";
|
||||
$atts = $x->xpath("/xml/data/@label");
|
||||
echo $atts[0] . "\n";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
I am A
|
||||
I am a:Nothing
|
||||
I am a:A
|
||||
I am a:Nothing
|
||||
I am Nothing
|
||||
I am Nothing
|
||||
===DONE===
|
||||
|
@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #46003 (isset on nonexisting nodes return unexpected results)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$xml =<<<XML
|
||||
@ -21,10 +23,13 @@ var_dump(isset($x->o->zz));
|
||||
var_dump(isset($x->o->text));
|
||||
var_dump(isset($x->o->xx));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
===DONE===
|
||||
|
@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #46047 (SimpleXML converts empty nodes into object with nested array)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$xml = new SimpleXMLElement('<foo><bar><![CDATA[]]></bar><baz/></foo>',
|
||||
@ -12,6 +14,7 @@ print_r($xml);
|
||||
$xml = new SimpleXMLElement('<foo><bar/><baz/></foo>');
|
||||
print_r($xml);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
SimpleXMLElement Object
|
||||
(
|
||||
@ -45,4 +48,6 @@ SimpleXMLElement Object
|
||||
(
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
===DONE===
|
||||
|
@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #46048 (SimpleXML top-level @attributes not part of iterator)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$xml = '
|
||||
@ -9,8 +11,8 @@ $xml = '
|
||||
';
|
||||
$obj = simplexml_load_string($xml);
|
||||
print_r(get_object_vars($obj));
|
||||
echo "Done\n";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
Array
|
||||
(
|
||||
@ -21,4 +23,4 @@ Array
|
||||
|
||||
[key] => value
|
||||
)
|
||||
Done
|
||||
===DONE===
|
||||
|
Loading…
Reference in New Issue
Block a user