Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit 6a273b0

Browse files
committed
fix errors in tests and stubs
Signed-off-by: mesilov <mesilov.maxim@gmail.com>
1 parent 50d8d04 commit 6a273b0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/Unit/Stubs/NullCore.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44

55
namespace Bitrix24\SDK\Tests\Unit\Stubs;
66

7+
use Bitrix24\SDK\Core\ApiClient;
78
use Bitrix24\SDK\Core\Commands\Command;
9+
use Bitrix24\SDK\Core\Contracts\ApiClientInterface;
810
use Bitrix24\SDK\Core\Contracts\CoreInterface;
11+
use Bitrix24\SDK\Core\Credentials\Credentials;
12+
use Bitrix24\SDK\Core\Credentials\WebhookUrl;
913
use Bitrix24\SDK\Core\Response\Response;
1014
use Psr\Log\NullLogger;
15+
use Symfony\Component\HttpClient\MockHttpClient;
1116
use Symfony\Component\HttpClient\Response\MockResponse;
1217

1318
/**
@@ -28,4 +33,9 @@ public function call(string $apiMethod, array $parameters = []): Response
2833
{
2934
return new Response(new MockResponse(''), new Command('', []), new NullLogger());
3035
}
36+
37+
public function getApiClient(): ApiClientInterface
38+
{
39+
return new ApiClient(Credentials::createForWebHook(new WebhookUrl('')), new MockHttpClient(), new NullLogger());
40+
}
3141
}

0 commit comments

Comments
 (0)