提交 66a8d7ef 编写于 作者: O overtrue

Fixed tests #180 & Resolved #184

上级 6f220c25
...@@ -145,13 +145,13 @@ class ChuanglanGatewayTest extends TestCase ...@@ -145,13 +145,13 @@ class ChuanglanGatewayTest extends TestCase
$config = ['channel' => ChuanglanGateway::CHANNEL_VALIDATE_CODE]; $config = ['channel' => ChuanglanGateway::CHANNEL_VALIDATE_CODE];
$config = new Config($config); $config = new Config($config);
$endpoint = 'https://smsbj1.253.com/msg/send/json'; $endpoint = 'https://smsbj1.253.com/msg/send/json';
$this->assertSame($endpoint, $method->invoke($gateway, $config)); $this->assertSame($endpoint, $method->invoke($gateway, $config, 86));
// 营销通道 // 营销通道
$config = ['channel' => ChuanglanGateway::CHANNEL_PROMOTION_CODE]; $config = ['channel' => ChuanglanGateway::CHANNEL_PROMOTION_CODE];
$config = new Config($config); $config = new Config($config);
$endpoint = 'https://smssh1.253.com/msg/send/json'; $endpoint = 'https://smssh1.253.com/msg/send/json';
$this->assertSame($endpoint, $method->invoke($gateway, $config)); $this->assertSame($endpoint, $method->invoke($gateway, $config, 86));
} }
/** /**
...@@ -168,12 +168,12 @@ class ChuanglanGatewayTest extends TestCase ...@@ -168,12 +168,12 @@ class ChuanglanGatewayTest extends TestCase
// 验证码通道 // 验证码通道
$config = ['channel' => ChuanglanGateway::CHANNEL_VALIDATE_CODE]; $config = ['channel' => ChuanglanGateway::CHANNEL_VALIDATE_CODE];
$config = new Config($config); $config = new Config($config);
$this->assertSame(ChuanglanGateway::CHANNEL_VALIDATE_CODE, $method->invoke($gateway, $config)); $this->assertSame(ChuanglanGateway::CHANNEL_VALIDATE_CODE, $method->invoke($gateway, $config, 86));
// 营销通道 // 营销通道
$config = ['channel' => ChuanglanGateway::CHANNEL_PROMOTION_CODE]; $config = ['channel' => ChuanglanGateway::CHANNEL_PROMOTION_CODE];
$config = new Config($config); $config = new Config($config);
$this->assertSame(ChuanglanGateway::CHANNEL_PROMOTION_CODE, $method->invoke($gateway, $config)); $this->assertSame(ChuanglanGateway::CHANNEL_PROMOTION_CODE, $method->invoke($gateway, $config, 86));
} }
/** /**
...@@ -192,7 +192,7 @@ class ChuanglanGatewayTest extends TestCase ...@@ -192,7 +192,7 @@ class ChuanglanGatewayTest extends TestCase
$this->expectExceptionMessage('Invalid channel for ChuanglanGateway.'); $this->expectExceptionMessage('Invalid channel for ChuanglanGateway.');
$config = ['channel' => 'error']; $config = ['channel' => 'error'];
$config = new Config($config); $config = new Config($config);
$method->invoke($gateway, $config); $method->invoke($gateway, $config, 86);
} }
/** /**
...@@ -211,7 +211,7 @@ class ChuanglanGatewayTest extends TestCase ...@@ -211,7 +211,7 @@ class ChuanglanGatewayTest extends TestCase
// 验证码通道 // 验证码通道
$config = ['channel' => ChuanglanGateway::CHANNEL_VALIDATE_CODE]; $config = ['channel' => ChuanglanGateway::CHANNEL_VALIDATE_CODE];
$config = new Config($config); $config = new Config($config);
$this->assertSame('这是短信内容。', $method->invoke($gateway, $content, $config)); $this->assertSame('这是短信内容。', $method->invoke($gateway, $content, $config, 86));
} }
/** /**
...@@ -234,7 +234,7 @@ class ChuanglanGatewayTest extends TestCase ...@@ -234,7 +234,7 @@ class ChuanglanGatewayTest extends TestCase
'unsubscribe' => '回TD退订', 'unsubscribe' => '回TD退订',
]; ];
$config = new Config($config); $config = new Config($config);
$this->assertSame('【通讯云】这是短信内容。回TD退订', $method->invoke($gateway, $content, $config)); $this->assertSame('【通讯云】这是短信内容。回TD退订', $method->invoke($gateway, $content, $config, 86));
} }
/** /**
...@@ -259,7 +259,7 @@ class ChuanglanGatewayTest extends TestCase ...@@ -259,7 +259,7 @@ class ChuanglanGatewayTest extends TestCase
'unsubscribe' => '回TD退订', 'unsubscribe' => '回TD退订',
]; ];
$config = new Config($config); $config = new Config($config);
$method->invoke($gateway, $content, $config); $method->invoke($gateway, $content, $config, 86);
} }
/** /**
...@@ -284,6 +284,6 @@ class ChuanglanGatewayTest extends TestCase ...@@ -284,6 +284,6 @@ class ChuanglanGatewayTest extends TestCase
'unsubscribe' => '', 'unsubscribe' => '',
]; ];
$config = new Config($config); $config = new Config($config);
$method->invoke($gateway, $content, $config); $method->invoke($gateway, $content, $config, 86);
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册