From: Christian Stocker Date: Sat, 29 Nov 2003 13:01:19 +0000 (+0000) Subject: fixed wrong check X-Git-Tag: php-5.0.0b3RC1~539 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=38b12e7f97d38bd94f102a5278bbea65027d735c;p=php fixed wrong check --- diff --git a/ext/xsl/tests/prepare.inc b/ext/xsl/tests/prepare.inc index c2e76fd4b3..bd5bbee40c 100644 --- a/ext/xsl/tests/prepare.inc +++ b/ext/xsl/tests/prepare.inc @@ -12,7 +12,7 @@ if(!$xsl) { exit; } $proc = new xsltprocessor; -if(!$xsl) { +if(!$proc) { echo "Error while making xsltprocessor object\n"; exit; } diff --git a/ext/xsl/tests/xslt.xsl b/ext/xsl/tests/xslt.xsl index 6248a28580..8331ccc2b5 100644 --- a/ext/xsl/tests/xslt.xsl +++ b/ext/xsl/tests/xslt.xsl @@ -1,6 +1,7 @@ - + + diff --git a/ext/xsl/tests/xslt011.phpt b/ext/xsl/tests/xslt011.phpt index a9b9f5767c..ead84e1d93 100644 --- a/ext/xsl/tests/xslt011.phpt +++ b/ext/xsl/tests/xslt011.phpt @@ -5,6 +5,10 @@ Test 11: php:function Support --FILE-- load(dirname(__FILE__)."/xslt011.xsl"); @@ -13,7 +17,6 @@ $dom = new domDocument(); $xml = new DomDocument(); $xml->load(dirname(__FILE__)."/xslt011.xml"); - print $proc->transformToXml($xml); function foobar($id ) { if (is_array($id)) { @@ -22,8 +25,23 @@ $dom = new domDocument(); return $id; } } + function nodeSet($id = null) { + if ($id and is_array($id)) { + return $id[0]; + } else { + $dom = new domdocument; + $dom->loadXML("this is from an external DomDocument"); + return $dom->documentElement ; + } + } + function nonDomNode() { + return new foo(); + } --EXPECT-- Test 11: php:function Support foobar foobar +this is from an external DomDocument +from the Input Document +not a DomNode object diff --git a/ext/xsl/tests/xslt011.xml b/ext/xsl/tests/xslt011.xml index 134efd02c0..f40500b0f5 100644 --- a/ext/xsl/tests/xslt011.xml +++ b/ext/xsl/tests/xslt011.xml @@ -1 +1 @@ - +This is from the Input Document diff --git a/ext/xsl/tests/xslt011.xsl b/ext/xsl/tests/xslt011.xsl index f6da07b266..2d5773f962 100644 --- a/ext/xsl/tests/xslt011.xsl +++ b/ext/xsl/tests/xslt011.xsl @@ -8,5 +8,14 @@ + + + + + + + + +