]> granicus.if.org Git - php/commitdiff
Update tests
authorRob Richards <rrichards@php.net>
Sat, 10 Jan 2004 11:50:49 +0000 (11:50 +0000)
committerRob Richards <rrichards@php.net>
Sat, 10 Jan 2004 11:50:49 +0000 (11:50 +0000)
ext/xsl/tests/xslt002.phpt
ext/xsl/tests/xslt004.phpt
ext/xsl/tests/xslt005.phpt
ext/xsl/tests/xslt008.phpt

index d8a0458d01c3dced0b930ff414596b2f04c06401..6c9f0c632c84450edc8018247dafd387e11cb8a2 100644 (file)
@@ -9,11 +9,11 @@ include("prepare.inc");
 // changing output method to html
 $xp = new domxpath($xsl);
 $res = $xp->query("/xsl:stylesheet/xsl:output/@method");
-if (count($res) != 1) {
+if ($res->length != 1) {
     print "No or more than one xsl:output/@method found";
     exit;
 }
-$res[0]->value = "html";
+$res->item(0)->value = "html";
 $proc->importStylesheet($xsl);
 print "\n";
 print $proc->transformToXml($dom);
index 6c4da2d0ef1aceb7922b20fc08bc1f158ff4940b..6e8f47601805e96e9f6491a8743a197962f7b438 100644 (file)
@@ -8,11 +8,11 @@ echo "Test 4: Checking UTF8 Output";
 include("prepare.inc");
 $xp = new domxpath($xsl);
 $res = $xp->query("/xsl:stylesheet/xsl:output/@encoding");
-if (count($res) != 1) {
+if ($res->length != 1) {
     print "No or more than one xsl:output/@encoding found";
     exit;
 }
-$res[0]->value = "utf-8";
+$res->item(0)->value = "utf-8";
 $proc->importStylesheet($xsl);
 print "\n";
 print $proc->transformToXml($dom);
index 272a226c7997c89e522051d46bab7acec31b38c4..a70e6ea4f1a7d1149e743b2636e0bf4ae70eaa51 100644 (file)
@@ -8,11 +8,11 @@ echo "Test 5: Checking Indent";
 include("prepare.inc");
 $xp = new domxpath($xsl);
 $res = $xp->query("/xsl:stylesheet/xsl:output/@indent");
-if (count($res) != 1) {
+if ($res->length != 1) {
     print "No or more than one xsl:output/@indent found";
     exit;
 }
-$res[0]->value = "yes";
+$res->item(0)->value = "yes";
 $proc->importStylesheet($xsl);
 print "\n";
 print $proc->transformToXml($dom);
index 76dcb1174d401469953d01029cb0a7a818312cec..31514d08119a1bbf80a93d20054bcbcc9252abd3 100644 (file)
@@ -15,7 +15,7 @@ if(!$xsl) {
 }
 $xp = new domxpath($xsl);
 $res = $xp->query("/xsl:stylesheet/xsl:include/@href");
-$res[0]->value = "compress.zlib://".dirname(__FILE__)."/xslt.xsl.gz";
+$res->item(0)->value = "compress.zlib://".dirname(__FILE__)."/xslt.xsl.gz";
 $proc->importStylesheet($xsl);
 print "\n";
 print $proc->transformToXML($dom);