From 840979858cc00ea1e835fdb7faa6bd1e253fc05a Mon Sep 17 00:00:00 2001 From: Rob Richards Date: Sat, 10 Jan 2004 11:50:49 +0000 Subject: [PATCH] Update tests --- ext/xsl/tests/xslt002.phpt | 4 ++-- ext/xsl/tests/xslt004.phpt | 4 ++-- ext/xsl/tests/xslt005.phpt | 4 ++-- ext/xsl/tests/xslt008.phpt | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/xsl/tests/xslt002.phpt b/ext/xsl/tests/xslt002.phpt index d8a0458d01..6c9f0c632c 100644 --- a/ext/xsl/tests/xslt002.phpt +++ b/ext/xsl/tests/xslt002.phpt @@ -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); diff --git a/ext/xsl/tests/xslt004.phpt b/ext/xsl/tests/xslt004.phpt index 6c4da2d0ef..6e8f476018 100644 --- a/ext/xsl/tests/xslt004.phpt +++ b/ext/xsl/tests/xslt004.phpt @@ -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); diff --git a/ext/xsl/tests/xslt005.phpt b/ext/xsl/tests/xslt005.phpt index 272a226c79..a70e6ea4f1 100644 --- a/ext/xsl/tests/xslt005.phpt +++ b/ext/xsl/tests/xslt005.phpt @@ -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); diff --git a/ext/xsl/tests/xslt008.phpt b/ext/xsl/tests/xslt008.phpt index 76dcb1174d..31514d0811 100644 --- a/ext/xsl/tests/xslt008.phpt +++ b/ext/xsl/tests/xslt008.phpt @@ -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); -- 2.50.1