提交 de84d317 编写于 作者: O overtrue

Fix tests.

上级 24723644
......@@ -25,12 +25,15 @@ class YunpianGatewayTest extends TestCase
$config = [
'api_key' => 'mock-api-key',
];
$gateway = \Mockery::mock(YunpianGateway::class.'[post]', [$config])->shouldAllowMockingProtectedMethods();
$gateway = \Mockery::mock(YunpianGateway::class.'[request]', [$config])->shouldAllowMockingProtectedMethods();
$gateway->shouldReceive('post')->with('https://sms.yunpian.com/v2/sms/single_send.json', [
'apikey' => 'mock-api-key',
'mobile' => '18188888888',
'text' => '【overtrue】This is a test message.',
$gateway->shouldReceive('request')->with('post', 'https://sms.yunpian.com/v2/sms/single_send.json', [
'form_params' => [
'apikey' => 'mock-api-key',
'mobile' => '18188888888',
'text' => '【overtrue】This is a test message.',
],
'exceptions' => false,
])->andReturn([
'code' => 0,
'msg' => '发送成功',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册