chregu          Sun Jan 18 07:30:53 2004 EDT

  Modified files:              
    /php-src/ext/xsl/tests      xslt011.phpt xslt011.xsl 
  Log:
  -test for more than one argument (this segfaulted before)
  
  
Index: php-src/ext/xsl/tests/xslt011.phpt
diff -u php-src/ext/xsl/tests/xslt011.phpt:1.3 php-src/ext/xsl/tests/xslt011.phpt:1.4
--- php-src/ext/xsl/tests/xslt011.phpt:1.3      Wed Dec  3 17:18:49 2003
+++ php-src/ext/xsl/tests/xslt011.phpt  Sun Jan 18 07:30:52 2004
@@ -18,11 +18,11 @@
   $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 @@
 
 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
Index: php-src/ext/xsl/tests/xslt011.xsl
diff -u php-src/ext/xsl/tests/xslt011.xsl:1.2 php-src/ext/xsl/tests/xslt011.xsl:1.3
--- php-src/ext/xsl/tests/xslt011.xsl:1.2       Sat Nov 29 08:01:19 2003
+++ php-src/ext/xsl/tests/xslt011.xsl   Sun Jan 18 07:30:52 2004
@@ -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)"/>

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to