summaryrefslogtreecommitdiff
path: root/ext/xsl/tests
diff options
context:
space:
mode:
authorChristian Stocker <chregu@php.net>2004-01-18 12:30:52 +0000
committerChristian Stocker <chregu@php.net>2004-01-18 12:30:52 +0000
commitc9bd0195a3550c92b381827a595e8415454cfd7c (patch)
tree90041cb4f861b34bdb11cab33471fdcd4a44f670 /ext/xsl/tests
parent0a210d797623487ead0b5a73e37efb03ded1d20a (diff)
downloadphp-git-c9bd0195a3550c92b381827a595e8415454cfd7c.tar.gz
-test for more than one argument (this segfaulted before)
Diffstat (limited to 'ext/xsl/tests')
-rw-r--r--ext/xsl/tests/xslt011.phpt10
-rw-r--r--ext/xsl/tests/xslt011.xsl2
2 files changed, 6 insertions, 6 deletions
diff --git a/ext/xsl/tests/xslt011.phpt b/ext/xsl/tests/xslt011.phpt
index 4691df0a98..46adfef5db 100644
--- a/ext/xsl/tests/xslt011.phpt
+++ b/ext/xsl/tests/xslt011.phpt
@@ -18,11 +18,11 @@ $dom = new domDocument();
$xml = new DomDocument();
$xml->load(dirname(__FILE__)."/xslt011.xml");
print $proc->transformToXml($xml);
- function foobar($id ) {
+ function foobar($id, $secondArg = "" ) {
if (is_array($id)) {
- return $id[0]->value;
+ return $id[0]->value . " - " . $secondArg;
} else {
- return $id;
+ return $id . " - " . $secondArg;
}
}
function nodeSet($id = null) {
@@ -42,8 +42,8 @@ Test 11: php:function Support
Notice: Object of class foo could not be converted to string in %s on line 15
<?xml version="1.0"?>
-foobar
-foobar
+foobar - secondArg
+foobar -
this is from an external DomDocument
from the Input Document
Object
diff --git a/ext/xsl/tests/xslt011.xsl b/ext/xsl/tests/xslt011.xsl
index 2d5773f962..55609bbeaa 100644
--- a/ext/xsl/tests/xslt011.xsl
+++ b/ext/xsl/tests/xslt011.xsl
@@ -4,7 +4,7 @@
xsl:extension-element-prefixes="php"
version='1.0'>
<xsl:template match="/">
-<xsl:value-of select="php:functionString('foobar', /doc/@id)"/>
+<xsl:value-of select="php:functionString('foobar', /doc/@id, 'secondArg')"/>
<xsl:text>
</xsl:text>
<xsl:value-of select="php:function('foobar', /doc/@id)"/>