fix ordering for test

In the open source build, this test has an inconsistent ordering. I think the underlying library doesn't maintain order of entities. Zend also has an inconsistent ordering. Lets stop testing the order.
Esse commit está contido em:
Paul Tarjan
2013-05-17 23:03:14 -07:00
commit de Sara Golemon
commit 97e81277da
2 arquivos alterados com 25 adições e 38 exclusões
+23 -31
Ver Arquivo
@@ -1,6 +1,5 @@
<?php
$xml = <<< EOXML
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE courses [
@@ -38,49 +37,42 @@ $dtd = $dom->doctype;
/* Notation Tests */
$nots = $dtd->notations;
$length = $nots->length; var_dump($length);
echo "Length: ".$length."
";
$length = $nots->length;
var_dump($length);
echo "Length: ".$length."\n";
foreach ($nots AS $key=>$node) {
echo "Key $key: ".$node->nodeName." (".
$node->systemId.") (".$node->publicId.")
";
echo "Key $key: ".$node->nodeName." (".
$node->systemId.") (".$node->publicId.")\n";
}
print "
";
for($x=0; $x < $length; $x++) {
echo "Index $x: ".$nots->item($x)->nodeName." (".
$nots->item($x)->systemId.") (".$nots->item($x)->publicId.")
";
echo "Index $x: ".$nots->item($x)->nodeName." (".
$nots->item($x)->systemId.") (".$nots->item($x)->publicId.")\n";
}
echo "
";
echo "\n";
$node = $nots->getNamedItem('xxx');
var_dump($node);
echo "
";
echo "\n";
/* Entity Decl Tests */
$ents = $dtd->entities;
$length = $ents->length;
echo "Length: ".$length."
";
foreach ($ents AS $key=>$node) {
echo "Key: $key Name: ".$node->nodeName."
";
}
echo "
";
for($x=0; $x < $length; $x++) {
echo "Index $x: ".$ents->item($x)->nodeName."
";
}
echo "
";
$node = $ents->item(3);
var_dump($node);
$length = $ents->length;
echo "Length: ".$length."\n";
$a = array();
foreach ($ents AS $key=>$node) {
$a[$key] = $node;
}
ksort($a);
foreach ($a as $key => $node) {
echo "Key: $key Name: ".$node->nodeName."\n";
}
echo "\n";
$node = $ents->getNamedItem('xxx');
var_dump($node);
+2 -7
Ver Arquivo
@@ -7,13 +7,8 @@ Index 0: GIF (image/gif) (-)
NULL
Length: 3
Key: test Name: test
Key: rdf Name: rdf
Key: myimage Name: myimage
Index 0: test
Index 1: rdf
Index 2: myimage
Key: rdf Name: rdf
Key: test Name: test
NULL
NULL