我的问题是:
我想通过模拟“getThirdPayUrlSpec”来测试“getThirdPayUrl”,如何使用 phpunit 创建一个模拟类?
class BasePayController{
public static function getThirdPayUrl($type,$order,$arr,&$url){
//$objCtrl = new AliPayController();
$objCtrl = self::getPayController($type);
$ret = $objCtrl->getThirdPayUrlSpec($order,$arr,$url);
return $ret;
}
}