aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Http/Client/ClientServiceTest.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2022-10-27 14:33:31 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2022-10-31 16:13:28 +0100
commit8aea25b5b92dac105f7e862470ee0dcf0e876615 (patch)
tree3095f0a58eb70e1c21117ce9c3450a1e60e323ba /tests/lib/Http/Client/ClientServiceTest.php
parentaa81b87f26552bc3d49de6cf0babfe6a79c21af5 (diff)
downloadnextcloud-server-8aea25b5b92dac105f7e862470ee0dcf0e876615.tar.gz
nextcloud-server-8aea25b5b92dac105f7e862470ee0dcf0e876615.zip
Add remote host validation API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Http/Client/ClientServiceTest.php')
-rw-r--r--tests/lib/Http/Client/ClientServiceTest.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/lib/Http/Client/ClientServiceTest.php b/tests/lib/Http/Client/ClientServiceTest.php
index 94f4d51ecee..ed1165236aa 100644
--- a/tests/lib/Http/Client/ClientServiceTest.php
+++ b/tests/lib/Http/Client/ClientServiceTest.php
@@ -1,4 +1,7 @@
<?php
+
+declare(strict_types=1);
+
/**
* Copyright (c) 2015 Lukas Reschke <lukas@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
@@ -14,9 +17,9 @@ use GuzzleHttp\Handler\CurlHandler;
use OC\Http\Client\Client;
use OC\Http\Client\ClientService;
use OC\Http\Client\DnsPinMiddleware;
-use OC\Http\Client\LocalAddressChecker;
use OCP\ICertificateManager;
use OCP\IConfig;
+use OCP\Security\IRemoteHostValidator;
/**
* Class ClientServiceTest
@@ -33,13 +36,13 @@ class ClientServiceTest extends \Test\TestCase {
->method('addDnsPinning')
->willReturn(function () {
});
- $localAddressChecker = $this->createMock(LocalAddressChecker::class);
+ $remoteHostValidator = $this->createMock(IRemoteHostValidator::class);
$clientService = new ClientService(
$config,
$certificateManager,
$dnsPinMiddleware,
- $localAddressChecker
+ $remoteHostValidator
);
$handler = new CurlHandler();
@@ -52,7 +55,7 @@ class ClientServiceTest extends \Test\TestCase {
$config,
$certificateManager,
$guzzleClient,
- $localAddressChecker
+ $remoteHostValidator
),
$clientService->newClient()
);