PageRenderTime 40ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/tests/ZendTest/Soap/TestAsset/call_user_func.php

https://github.com/eiwaen/zf2
PHP | 39 lines | 20 code | 7 blank | 12 comment | 1 complexity | 125bc002a300882f587f5a0dc7f7a0fa MD5 | raw file
Possible License(s): BSD-3-Clause
  1. <?php
  2. /**
  3. * Zend Framework (http://framework.zend.com/)
  4. *
  5. * @link http://github.com/zendframework/zf2 for the canonical source repository
  6. * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
  7. * @license http://framework.zend.com/license/new-bsd New BSD License
  8. */
  9. namespace Zend\Soap;
  10. use ZendTest\Soap\TestAsset\MockCallUserFunc;
  11. /**
  12. * Function interceptor for call_user_func.
  13. *
  14. * @return mixed Return value.
  15. */
  16. function call_user_func()
  17. {
  18. if (!MockCallUserFunc::$mock) {
  19. return call_user_func_array('\call_user_func', func_get_args());
  20. }
  21. MockCallUserFunc::$params = func_get_args();
  22. $result = '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">'
  23. . '<s:Body>';
  24. $result .= '<TestMethodResponse xmlns="http://unit/test">'
  25. . '<TestMethodResult>'
  26. . '<TestMethodResult><dummy></dummy></TestMethodResult>'
  27. . '</TestMethodResult>'
  28. . '</TestMethodResponse>';
  29. $result .= '</s:Body>'
  30. . '</s:Envelope>';
  31. return $result;
  32. }