Add a test for registering anonymous functions in the server dispatch map
[plcapi.git] / tests / 3LocalhostTest.php
index b782319..629fc7c 100644 (file)
@@ -601,6 +601,15 @@ And turned it into nylon';
         }
     }
 
+    public function testClosure()
+    {
+        $f = new xmlrpcmsg('examples.php5.getStateName', array(
+            new xmlrpcval(23, 'int'),
+        ));
+        $v = $this->send($f);
+        $this->assertEquals('Michigan', $v->scalarval());
+    }
+
     public function testGetCookies()
     {
         // let server set to us some cookies we tell it