lithium\test\Mocker::_stringMethodParams()
Will return the params in a way that can be placed into compact()
Parameters
-
ReflectionFunctionAbstract
$method
Returns
stringSource
protected static function _stringMethodParams(ReflectionFunctionAbstract $method) {
$pattern = '/Parameter [^$]+\$([^ ]+)/';
preg_match_all($pattern, $method, $matches);
$params = implode("', '", $matches[1]);
return strlen($params) > 0 ? "'{$params}'" : 'array()';
}