Commit: d14f23365cda4e830aa09fcf1d64c07c4fde21c9 Author: Christopher Jones <s...@php.net> Tue, 1 May 2012 15:43:31 -0700 Parents: 02e25df8b5a7c60364c7153c03da59de3a556a87 Branches: PHP-5.3 PHP-5.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d14f23365cda4e830aa09fcf1d64c07c4fde21c9 Log: Make output order for dom007.phpt platform independent This test has long been near the top of the reported output diffs. For example, on http://qa.php.net/reports/?version=5.4.0 it has diffed 1307 times out of 3543 reports, at time of this commit. (The second highest diff has occurred 710 times.) Changed paths: M ext/dom/tests/dom007.phpt Diff: diff --git a/ext/dom/tests/dom007.phpt b/ext/dom/tests/dom007.phpt index 649d630..5d12aa3 100644 --- a/ext/dom/tests/dom007.phpt +++ b/ext/dom/tests/dom007.phpt @@ -63,12 +63,24 @@ echo "\n"; $ents = $dtd->entities; $length = $ents->length; echo "Length: ".$length."\n"; + +$xkeys = array(); foreach ($ents AS $key=>$node) { - echo "Key: $key Name: ".$node->nodeName."\n"; + $xkeys[] = "Key: $key Name: ".$node->nodeName."\n"; +} +sort($xkeys); // fix inconsistent output ordering (bug #61810) +foreach ($xkeys as $key => $node) { + echo $node; } echo "\n"; + +$xkeys = array(); for($x=0; $x < $length; $x++) { - echo "Index $x: ".$ents->item($x)->nodeName."\n"; + $xkeys[] = "Index: ".$ents->item($x)->nodeName."\n"; +} +sort($xkeys); // fix inconsistent output ordering (bug #61810) +foreach ($xkeys as $key => $node) { + echo $node; } echo "\n"; @@ -87,13 +99,13 @@ Index 0: GIF (image/gif) (-) NULL Length: 3 -Key: test Name: test -Key: rdf Name: rdf Key: myimage Name: myimage +Key: rdf Name: rdf +Key: test Name: test -Index 0: test -Index 1: rdf -Index 2: myimage +Index: myimage +Index: rdf +Index: test NULL NULL -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php