We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
修改 WechatPayAPIServer const -> var,支持 server mock。或者在离线环境有没有其他 mock 的方式?
WechatPayAPIServer
core/consts/consts.go
// L9 const ( WechatPayAPIServer = "https://api.mch.weixin.qq.com" )
The text was updated successfully, but these errors were encountered:
@snxq mock测试可以使用 https://github.com/xhd2015/xgo, 在这个PR #218 中我使用xgo替换了gomonkey进行单元测试的mock
Sorry, something went wrong.
@xhd2015 想要模块测试联调时候的 mock,而不是单测打桩。0.0
@snxq 哦,那你可以mock http.Client.Do,当你检测到url参数是wechat server的时候,将它替换为自定义的URL,可以参考https://github.com/xhd2015/xgo/blob/6d0b9575f1b682d155435640a137a3f541ddef82/runtime/test/mock_stdlib/mock_stdlib_test.go#L42
No branches or pull requests
修改
WechatPayAPIServer
const -> var,支持 server mock。或者在离线环境有没有其他 mock 的方式?core/consts/consts.go
The text was updated successfully, but these errors were encountered: