From 97f6410ac8561bbea2ea806bc6f23f67bef985e4 Mon Sep 17 00:00:00 2001
From: Roeland Jago Douma <roeland@famdouma.nl>
Date: Wed, 7 Sep 2016 20:05:51 +0200
Subject: [PATCH] Fix getMock Http Client

---
 tests/lib/Http/Client/ClientServiceTest.php | 6 ++++--
 tests/lib/Http/Client/ClientTest.php        | 5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/lib/Http/Client/ClientServiceTest.php b/tests/lib/Http/Client/ClientServiceTest.php
index 3c406f30111..48330dc33c0 100644
--- a/tests/lib/Http/Client/ClientServiceTest.php
+++ b/tests/lib/Http/Client/ClientServiceTest.php
@@ -11,14 +11,16 @@ namespace Test\Http\Client;
 use GuzzleHttp\Client as GuzzleClient;
 use OC\Http\Client\Client;
 use OC\Http\Client\ClientService;
+use OCP\ICertificateManager;
+use OCP\IConfig;
 
 /**
  * Class ClientServiceTest
  */
 class ClientServiceTest extends \Test\TestCase {
 	public function testNewClient() {
-		$config = $this->getMock('\OCP\IConfig');
-		$certificateManager = $this->getMock('\OCP\ICertificateManager');
+		$config = $this->createMock(IConfig::class);
+		$certificateManager = $this->createMock(ICertificateManager::class);
 
 		$expected = new Client($config, $certificateManager, new GuzzleClient());
 		$clientService = new ClientService($config, $certificateManager);
diff --git a/tests/lib/Http/Client/ClientTest.php b/tests/lib/Http/Client/ClientTest.php
index 705e1eeddea..4369eab3a54 100644
--- a/tests/lib/Http/Client/ClientTest.php
+++ b/tests/lib/Http/Client/ClientTest.php
@@ -10,6 +10,7 @@ namespace Test\Http\Client;
 
 use GuzzleHttp\Message\Response;
 use OC\Http\Client\Client;
+use OCP\ICertificateManager;
 use OCP\IConfig;
 
 /**
@@ -25,11 +26,11 @@ class ClientTest extends \Test\TestCase {
 
 	public function setUp() {
 		parent::setUp();
-		$this->config = $this->getMock('\OCP\IConfig');
+		$this->config = $this->createMock(IConfig::class);
 		$this->guzzleClient = $this->getMockBuilder('\GuzzleHttp\Client')
 			->disableOriginalConstructor()
 			->getMock();
-		$certificateManager = $this->getMock('\OCP\ICertificateManager');
+		$certificateManager = $this->createMock(ICertificateManager::class);
 		$this->client = new Client(
 			$this->config,
 			$certificateManager,
-- 
GitLab