diff --git a/tests/lib/Files/Config/UserMountCacheTest.php b/tests/lib/Files/Config/UserMountCacheTest.php
index b9e09687c956b22baba4ad84be92dfbc8170b718..85bc4146a2d53a01836f63bbc78231cb6f858715 100644
--- a/tests/lib/Files/Config/UserMountCacheTest.php
+++ b/tests/lib/Files/Config/UserMountCacheTest.php
@@ -47,7 +47,7 @@ class UserMountCacheTest extends TestCase {
 		$userBackend->createUser('u1', '');
 		$userBackend->createUser('u2', '');
 		$this->userManager->registerBackend($userBackend);
-		$this->cache = new \OC\Files\Config\UserMountCache($this->connection, $this->userManager, $this->getMock('\OC\Log'));
+		$this->cache = new \OC\Files\Config\UserMountCache($this->connection, $this->userManager, $this->createMock(Log::class));
 	}
 
 	public function tearDown() {