]> granicus.if.org Git - php/commitdiff
Add missing SKIPIF sections to tests
authorandy wharmby <wharmby@php.net>
Mon, 3 Aug 2009 22:40:58 +0000 (22:40 +0000)
committerandy wharmby <wharmby@php.net>
Mon, 3 Aug 2009 22:40:58 +0000 (22:40 +0000)
15 files changed:
ext/simplexml/tests/bug36611.phpt
ext/simplexml/tests/bug40451.phpt
ext/simplexml/tests/bug41175.phpt
ext/simplexml/tests/bug41582.phpt
ext/simplexml/tests/bug41861.phpt
ext/simplexml/tests/bug41867.phpt
ext/simplexml/tests/bug41947.phpt
ext/simplexml/tests/bug42259.phpt
ext/simplexml/tests/bug42369.phpt
ext/simplexml/tests/bug43221.phpt
ext/simplexml/tests/bug44478.phpt
ext/simplexml/tests/bug45553.phpt
ext/simplexml/tests/bug46003.phpt
ext/simplexml/tests/bug46047.phpt
ext/simplexml/tests/bug46048.phpt

index 835e926fe5c9c1a0576bf1d4d070c5bca8030441..fdcfd4743c1a47976a7e1bd668403be0da4190e6 100644 (file)
@@ -19,12 +19,12 @@ $xml = simplexml_load_string ($xml_str) ;
 $val = 1;
 
 var_dump($val);
-$obj->pos["act_idx"] = $val;
+$zml->pos["act_idx"] = $val;
 var_dump($val) ;
 
-echo "Done\n";
 ?>
+===DONE===
 --EXPECT--     
 int(1)
 int(1)
-Done
+===DONE===
index 1a499a731d23014c7ab3d695d19132f090388cf7..afd78c769f9f5b0bb602982c0f132d512f36843b 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 Bug #40451 (addAttribute() may crash when used with non-existent child node)
+--SKIPIF--
+<?php if (!extension_loaded("simplexml")) print "skip"; ?>
 --FILE--
 <?php
 
@@ -15,8 +17,8 @@ $xml = simplexml_load_string($string);
 $add = $xml->addChild('Host');
 $add->Host->addAttribute('enable', 'true');
 
-echo "Done\n";
 ?>
+===DONE===
 --EXPECTF--    
 Warning: SimpleXMLElement::addAttribute(): Unable to locate parent Element in %s on line %d
-Done
+===DONE===
index 51181d29c03660b85853c63cc622aabeda26ea31..db03da977ed655f2522bff7f4456a30f2b06bd85 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 Bug #41175 (addAttribute() fails to add an attribute with an empty value)
+--SKIPIF--
+<?php if (!extension_loaded("simplexml")) print "skip"; ?>
 --FILE--
 <?php
 
@@ -8,9 +10,9 @@ $xml->addAttribute("src", "foo");
 $xml->addAttribute("alt", "");
 echo $xml->asXML();
 
-echo "Done\n";
 ?>
+===DONE===
 --EXPECT--     
 <?xml version="1.0"?>
 <img src="foo" alt=""/>
-Done
\ No newline at end of file
+===DONE===
\ No newline at end of file
index b689607d0c3451d951dec111ba8a45321a480cf7..8733810d71a3be95126f4c841841bfc157199616 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 Bug #41582 (SimpleXML crashes when accessing newly created element)
+--SKIPIF--
+<?php if (!extension_loaded("simplexml")) print "skip"; ?>
 --FILE--
 <?php
 
@@ -10,9 +12,9 @@ $xml->movie[]->characters->character[0]->name = 'Miss Coder';
 
 echo($xml->asXml());
 
-echo "Done\n";
 ?>
+===DONE===
 --EXPECT--
 <?xml version="1.0" standalone="yes"?>
 <collection><movie><characters><character><name>Miss Coder</name></character></characters></movie></collection>
-Done
+===DONE===
index 07622ebbd38a294a09836f1aa5c90ad9520b9bd1..087b57058f5cea8177a0f349db3ec604945a9f5b 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 Bug #41861 (getNamespaces() returns the namespaces of a node's siblings)
+       --SKIPIF--
+       <?php if (!extension_loaded("simplexml")) print "skip"; ?>
 --FILE--
 <?php
 
@@ -28,6 +30,7 @@ foreach (array(null, '#ns1', '#ns2', '#ns3') as $ns)
        }
 }
 ?>
+===DONE===
 --EXPECT--
 root(recursive): 'root' -- namespaces: #ns1, #ns2, #ns3
 root(non-recursive): 'root' -- namespaces: 
@@ -36,3 +39,4 @@ children(): 'last_node_no_ns' -- namespaces:
 children(#ns1): 'node1' -- namespaces: #ns1
 children(#ns2): 'node2' -- namespaces: #ns2
 children(#ns3): 'node3' -- namespaces: #ns3
+===DONE===
\ No newline at end of file
index f530f95dcc48a69796d2df91a214f134fcaf9155..33e2de9e22a4e66233223a167938d699cfffde8c 100644 (file)
@@ -1,14 +1,18 @@
 --TEST--
 Bug #41867 (getName is broken)
+--SKIPIF--
+<?php if (!extension_loaded("simplexml")) print "skip"; ?>
 --FILE--
 <?php
 
 $a = simplexml_load_string("<a><b><c/></b></a>");
 echo $a->getName()."\n";
 echo $a->b->getName()."\n";
-echo $a->b->c->getName();
+echo $a->b->c->getName()."\n";
 ?>
+===DONE===
 --EXPECT--
 a
 b
 c
+===DONE===
index 7af9ff8e76d32009dfd421d6fed2c3c9c146dab9..0b974ce4f5aa79756df519669efa8750e0fe9df4 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 Bug #41947 (addChild incorrectly registers empty strings as namespaces)
+--SKIPIF--
+<?php if (!extension_loaded("simplexml")) print "skip"; ?>
 --FILE--
 <?php
 $xml = simplexml_load_string('<?xml version="1.0" encoding="utf-8"?><root xmlns:myns="http://myns" />');
@@ -7,8 +9,10 @@ $grandchild = $xml->addChild('child', null, 'http://myns')->addChild('grandchild
 
 $gchild = $xml->xpath("//grandchild");
 if (count($gchild) > 0) {
-    echo $gchild[0];
+    echo $gchild[0]."\n";
 }
 ?>
+===DONE===
 --EXPECT--
 hello
+===DONE===
index 19c02a577aab776c70f1aa805a3f7227080976b3..3dd2c51f2f5b1e2c214f4e61fcc56091589768f4 100644 (file)
@@ -1,6 +1,8 @@
 --TEST--
 Bug #42259 (SimpleXMLIterator loses ancestry)
 --SKIPIF--
+<?php if (!extension_loaded("simplexml")) print "skip"; ?>
+--SKIPIF--
 <?php
 if (!extension_loaded('simplexml')) print 'skip';
 if (!extension_loaded("libxml")) print "skip LibXML not present";
index e5df81460dbb8cbb77c6e1e5b4d2195e48c4d6a1..e186770033c7ae9d797a7bc21c97982569a1a41c 100644 (file)
@@ -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,9 @@ Bug #42369 (Implicit conversion to string leaks memory)
         md5($x->x);
     }
 
-    echo 'done' . PHP_EOL;
 ?>
+===DONE===
 --EXPECT--
 explicit conversion
 no conversion
-done
\ No newline at end of file
+===DONE===
\ No newline at end of file
index 6973d091c7988f18ea7ec16ba43329dc7ba47685..53b6efdccdd4ce630b7a5a1ee725c42e20903e1d 100644 (file)
@@ -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>
\ No newline at end of file
+<root><node xmlns:foo="http://bar.com" a="b" foo:e="f">value</node></root>
+===DONE===
+       
\ No newline at end of file
index 5c21d75c8bafaa81211c0f9bd340480adde7045c..17a26f949b97bcfae7283d3be54d5e9baee0013b 100644 (file)
@@ -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 &#38; b
 a &#38; b
@@ -22,3 +25,5 @@ a & b
 a & b
 <?xml version="1.0"?>
 <root><node1>a &amp;#38; b</node1><node2>a &amp; b</node2></root>
+===DONE===
+       
\ No newline at end of file
index 37a46f42765428dfa2bbe4485bbe86449ae1e9e9..b355c48696f2057d8b7b5111daad3d5be4792cd4 100644 (file)
@@ -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
\ No newline at end of file
+I am Nothing
+===DONE===
+       
\ No newline at end of file
index a10b01872582c8c1cb9fe5d479b504cfa43ca0d6..712675c097ab034d35612ed52482229021780dd6 100644 (file)
@@ -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)
\ No newline at end of file
+bool(true)
+===DONE===
+       
\ No newline at end of file
index 37f31cdeb6933e46d4843b859e2abeb3a01c6cb0..0438154823f5fd305c9bd07852cbdac6ad3d0d0b 100644 (file)
@@ -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
         (
         )
 
-)
\ No newline at end of file
+)
+===DONE===
+       
\ No newline at end of file
index e3eb4f5462fe8dbcc5408160903a8c97aa17695a..97fc9ed083019ad0bd9d6eb49b14c44b771aae40 100644 (file)
@@ -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===