upddate message
This commit is contained in:
parent
1404740fe5
commit
54f571028a
|
@ -31,7 +31,7 @@ class HogeDriver extends AbstractDriver
|
||||||
$response = $this->client->post($url, $data);
|
$response = $this->client->post($url, $data);
|
||||||
$result = $response->toArray() ?? [];
|
$result = $response->toArray() ?? [];
|
||||||
if ($result['code'] != 200) {
|
if ($result['code'] != 200) {
|
||||||
throw new DriverErrorException($result['message'] ?? '未知错误', $result['code'], $response);
|
throw new DriverErrorException($result['msg'] ?? '未知错误', $result['code'], $response);
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
/**
|
|
||||||
* This file is part of hyperf-ext/sms.
|
|
||||||
*
|
|
||||||
* @link https://github.com/hyperf-ext/sms
|
|
||||||
* @contact eric@zhu.email
|
|
||||||
* @license https://github.com/hyperf-ext/sms/blob/master/LICENSE
|
|
||||||
*/
|
|
||||||
require_once dirname(dirname(__FILE__)) . '/vendor/autoload.php';
|
|
||||||
|
|
||||||
use Hyperf\Config\Config;
|
|
||||||
use Hyperf\Contract\ConfigInterface;
|
|
||||||
use Hyperf\Utils\ApplicationContext;
|
|
||||||
use HyperfExt\Mail\Contracts\MailManagerInterface;
|
|
||||||
use HyperfExt\Mail\MailManager;
|
|
||||||
use Mockery as m;
|
|
||||||
use Psr\Container\ContainerInterface;
|
|
||||||
use Psr\EventDispatcher\EventDispatcherInterface;
|
|
||||||
|
|
||||||
$container = m::mock(ContainerInterface::class);
|
|
||||||
$container->shouldReceive('get')->with(EventDispatcherInterface::class)->andReturn(m::mock(EventDispatcherInterface::class));
|
|
||||||
$container->shouldReceive('get')->with(ConfigInterface::class)->andReturn(new Config([]));
|
|
||||||
$container->shouldReceive('get')->with(MailManagerInterface::class)->andReturn(new MailManager($container));
|
|
||||||
|
|
||||||
ApplicationContext::setContainer($container);
|
|
Loading…
Reference in New Issue
Block a user