xref: /PHP-7.1/ext/soap/tests/server007.phpt (revision 50827378)
1--TEST--
2SOAP Server 7: addfunction and getfunctions
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7function Add($x,$y) {
8  return $x+$y;
9}
10function Sub($x,$y) {
11  return $x-$y;
12}
13
14$server = new soapserver(null,array('uri'=>"http://testuri.org"));
15$server->addfunction(array("Sub","Add"));
16var_dump($server->getfunctions());
17echo "ok\n";
18?>
19--EXPECT--
20array(2) {
21  [0]=>
22  string(3) "Sub"
23  [1]=>
24  string(3) "Add"
25}
26ok
27