aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Http/Client
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2023-06-28 09:04:36 +0200
committerGitHub <noreply@github.com>2023-06-28 09:04:36 +0200
commitfbc63fe57c7665e7a923ae70deac3ce8fa497acf (patch)
tree8e09e90b7678385d7d7a1c919f86972fcb210f1a /tests/lib/Http/Client
parent7f3c26a65a1ab36067e2623f4208163e5cb14b3e (diff)
parentec6728d710ad786fd4e5b762ec3835f6dcaa67b8 (diff)
downloadnextcloud-server-fbc63fe57c7665e7a923ae70deac3ce8fa497acf.tar.gz
nextcloud-server-fbc63fe57c7665e7a923ae70deac3ce8fa497acf.zip
Merge pull request #38613 from nextcloud/feat/35959/async-guzzle-requests
feat(HTTPClient): Provide wrapped access to Guzzle's asyncRequest()
Diffstat (limited to 'tests/lib/Http/Client')
-rw-r--r--tests/lib/Http/Client/ClientServiceTest.php8
-rw-r--r--tests/lib/Http/Client/ClientTest.php5
2 files changed, 10 insertions, 3 deletions
diff --git a/tests/lib/Http/Client/ClientServiceTest.php b/tests/lib/Http/Client/ClientServiceTest.php
index 72281a0453c..40da0a2111c 100644
--- a/tests/lib/Http/Client/ClientServiceTest.php
+++ b/tests/lib/Http/Client/ClientServiceTest.php
@@ -23,6 +23,7 @@ use OCP\ICertificateManager;
use OCP\IConfig;
use OCP\Security\IRemoteHostValidator;
use Psr\Http\Message\RequestInterface;
+use Psr\Log\LoggerInterface;
/**
* Class ClientServiceTest
@@ -41,13 +42,15 @@ class ClientServiceTest extends \Test\TestCase {
});
$remoteHostValidator = $this->createMock(IRemoteHostValidator::class);
$eventLogger = $this->createMock(IEventLogger::class);
+ $logger = $this->createMock(LoggerInterface::class);
$clientService = new ClientService(
$config,
$certificateManager,
$dnsPinMiddleware,
$remoteHostValidator,
- $eventLogger
+ $eventLogger,
+ $logger,
);
$handler = new CurlHandler();
@@ -65,7 +68,8 @@ class ClientServiceTest extends \Test\TestCase {
$config,
$certificateManager,
$guzzleClient,
- $remoteHostValidator
+ $remoteHostValidator,
+ $logger,
),
$clientService->newClient()
);
diff --git a/tests/lib/Http/Client/ClientTest.php b/tests/lib/Http/Client/ClientTest.php
index 9a4fb1c657e..e48e237e0cc 100644
--- a/tests/lib/Http/Client/ClientTest.php
+++ b/tests/lib/Http/Client/ClientTest.php
@@ -19,6 +19,7 @@ use OCP\ICertificateManager;
use OCP\IConfig;
use OCP\Security\IRemoteHostValidator;
use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
use function parse_url;
/**
@@ -44,11 +45,13 @@ class ClientTest extends \Test\TestCase {
$this->guzzleClient = $this->createMock(\GuzzleHttp\Client::class);
$this->certificateManager = $this->createMock(ICertificateManager::class);
$this->remoteHostValidator = $this->createMock(IRemoteHostValidator::class);
+ $this->logger = $this->createMock(LoggerInterface::class);
$this->client = new Client(
$this->config,
$this->certificateManager,
$this->guzzleClient,
- $this->remoteHostValidator
+ $this->remoteHostValidator,
+ $this->logger,
);
}