mirror of
https://github.com/elyby/accounts.git
synced 2024-11-09 15:02:19 +05:30
Update dependencies
This commit is contained in:
parent
9c6d9409ea
commit
ab7ae95e60
@ -10,8 +10,9 @@ use GuzzleHttp\Exception\ServerException;
|
||||
use GuzzleHttp\Handler\MockHandler;
|
||||
use GuzzleHttp\HandlerStack;
|
||||
use GuzzleHttp\Middleware;
|
||||
use GuzzleHttp\Psr7\Request;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use yii\queue\Queue;
|
||||
|
||||
/**
|
||||
@ -29,11 +30,12 @@ class DeliveryWebHookTest extends TestCase {
|
||||
public function testCanRetry() {
|
||||
$task = new DeliveryWebHook();
|
||||
$this->assertFalse($task->canRetry(1, new \Exception()));
|
||||
$request = new Request('POST', 'http://localhost');
|
||||
$request = $this->createMock(RequestInterface::class);
|
||||
$response = $this->createMock(ResponseInterface::class);
|
||||
$this->assertTrue($task->canRetry(4, new ConnectException('', $request)));
|
||||
$this->assertTrue($task->canRetry(4, new ServerException('', $request)));
|
||||
$this->assertTrue($task->canRetry(4, new ServerException('', $request, $response)));
|
||||
$this->assertFalse($task->canRetry(5, new ConnectException('', $request)));
|
||||
$this->assertFalse($task->canRetry(5, new ServerException('', $request)));
|
||||
$this->assertFalse($task->canRetry(5, new ServerException('', $request, $response)));
|
||||
}
|
||||
|
||||
public function testExecuteSuccessDelivery() {
|
||||
@ -46,7 +48,7 @@ class DeliveryWebHookTest extends TestCase {
|
||||
'another' => 'value',
|
||||
];
|
||||
$task->execute($this->createMock(Queue::class));
|
||||
/** @var Request $request */
|
||||
/** @var \GuzzleHttp\Psr7\Request $request */
|
||||
$request = $this->historyContainer[0]['request'];
|
||||
$this->assertSame('http://localhost:81/webhooks/ely', (string)$request->getUri());
|
||||
$this->assertStringStartsWith('Account-Ely-Hookshot/', $request->getHeaders()['User-Agent'][0]);
|
||||
@ -67,7 +69,7 @@ class DeliveryWebHookTest extends TestCase {
|
||||
'another' => 'value',
|
||||
];
|
||||
$task->execute($this->createMock(Queue::class));
|
||||
/** @var Request $request */
|
||||
/** @var \GuzzleHttp\Psr7\Request $request */
|
||||
$request = $this->historyContainer[0]['request'];
|
||||
$this->assertSame('http://localhost:81/webhooks/ely', (string)$request->getUri());
|
||||
$this->assertStringStartsWith('Account-Ely-Hookshot/', $request->getHeaders()['User-Agent'][0]);
|
||||
|
@ -28,17 +28,17 @@
|
||||
"ely/mojang-api": "^0.2.0",
|
||||
"ely/yii2-tempmail-validator": "^2.0",
|
||||
"goaop/framework": "^2.2.0",
|
||||
"guzzlehttp/guzzle": "^6.0.0",
|
||||
"guzzlehttp/guzzle": "^6|^7",
|
||||
"lcobucci/jwt": "^3.3",
|
||||
"league/oauth2-server": "dev-adaptation",
|
||||
"mito/yii2-sentry": "^1.0",
|
||||
"nesbot/carbon": "^2.22",
|
||||
"paragonie/constant_time_encoding": "^2.0",
|
||||
"ramsey/uuid": "^4.0.0",
|
||||
"sam-it/yii2-mariadb": "^2.0.0",
|
||||
"sam-it/yii2-mariadb": "^3",
|
||||
"spomky-labs/otphp": "^10.0.0",
|
||||
"webmozart/assert": "^1.2.0",
|
||||
"yiisoft/yii2": "~2.0.20",
|
||||
"yiisoft/yii2": "~2.0.38",
|
||||
"yiisoft/yii2-queue": "^2.2.0",
|
||||
"yiisoft/yii2-redis": "~2.0.0",
|
||||
"yiisoft/yii2-swiftmailer": "~2.1.0"
|
||||
|
1854
composer.lock
generated
1854
composer.lock
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user