/tests/ZendTest/Soap/TestAsset/call_user_func.php
PHP | 39 lines | 20 code | 7 blank | 12 comment | 1 complexity | 125bc002a300882f587f5a0dc7f7a0fa MD5 | raw file
- <?php
- /**
- * Zend Framework (http://framework.zend.com/)
- *
- * @link http://github.com/zendframework/zf2 for the canonical source repository
- * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- * @license http://framework.zend.com/license/new-bsd New BSD License
- */
- namespace Zend\Soap;
- use ZendTest\Soap\TestAsset\MockCallUserFunc;
- /**
- * Function interceptor for call_user_func.
- *
- * @return mixed Return value.
- */
- function call_user_func()
- {
- if (!MockCallUserFunc::$mock) {
- return call_user_func_array('\call_user_func', func_get_args());
- }
- MockCallUserFunc::$params = func_get_args();
- $result = '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">'
- . '<s:Body>';
- $result .= '<TestMethodResponse xmlns="http://unit/test">'
- . '<TestMethodResult>'
- . '<TestMethodResult><dummy></dummy></TestMethodResult>'
- . '</TestMethodResult>'
- . '</TestMethodResponse>';
- $result .= '</s:Body>'
- . '</s:Envelope>';
- return $result;
- }