diff --git a/tests/lib/Lock/DBLockingProviderTest.php b/tests/lib/Lock/DBLockingProviderTest.php
index a7c3f4631554b3566e476537135c4e3616b96cfb..fb27f9957af995db2f909557fec5c657d1f644b4 100644
--- a/tests/lib/Lock/DBLockingProviderTest.php
+++ b/tests/lib/Lock/DBLockingProviderTest.php
@@ -21,6 +21,7 @@
 
 namespace Test\Lock;
 
+use OCP\AppFramework\Utility\ITimeFactory;
 use OCP\Lock\ILockingProvider;
 
 /**
@@ -50,7 +51,7 @@ class DBLockingProviderTest extends LockingProvider {
 
 	public function setUp() {
 		$this->currentTime = time();
-		$this->timeFactory = $this->getMock('\OCP\AppFramework\Utility\ITimeFactory');
+		$this->timeFactory = $this->createMock(ITimeFactory::class);
 		$this->timeFactory->expects($this->any())
 			->method('getTime')
 			->will($this->returnCallback(function () {