server027.phpt 433 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. SOAP Server 27: setObject and getFunctions
  3. --EXTENSIONS--
  4. soap
  5. --FILE--
  6. <?php
  7. class Foo {
  8. function __construct() {
  9. }
  10. function test() {
  11. return $this->str;
  12. }
  13. }
  14. $foo = new Foo();
  15. $server = new SoapServer(null,array('uri'=>"http://testuri.org"));
  16. $server->setObject($foo);
  17. var_dump($server->getfunctions());
  18. echo "ok\n";
  19. ?>
  20. --EXPECT--
  21. array(2) {
  22. [0]=>
  23. string(11) "__construct"
  24. [1]=>
  25. string(4) "test"
  26. }
  27. ok