diff --git a/tests/lib/Encryption/DecryptAllTest.php b/tests/lib/Encryption/DecryptAllTest.php
index ed86b743c3b71d16a28905c9e758d15692082ad7..7859a65ff6d444e24f1c347169b737bc85151727 100644
--- a/tests/lib/Encryption/DecryptAllTest.php
+++ b/tests/lib/Encryption/DecryptAllTest.php
@@ -29,6 +29,7 @@ use OC\Encryption\Manager;
 use OC\Files\FileInfo;
 use OC\Files\View;
 use OCP\IUserManager;
+use Symfony\Component\Console\Formatter\OutputFormatterInterface;
 use Test\TestCase;
 
 /**
@@ -78,7 +79,7 @@ class DecryptAllTest extends TestCase {
 			->disableOriginalConstructor()->getMock();
 
 		$this->outputInterface->expects($this->any())->method('getFormatter')
-			->willReturn($this->getMock('\Symfony\Component\Console\Formatter\OutputFormatterInterface'));
+			->willReturn($this->createMock(OutputFormatterInterface::class));
 
 		$this->instance = new DecryptAll($this->encryptionManager, $this->userManager, $this->view);