diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php index fb9dee1505..04eafc99f3 100644 --- a/tests/lib/Files/FilesystemTest.php +++ b/tests/lib/Files/FilesystemTest.php @@ -376,7 +376,7 @@ class FilesystemTest extends \Test\TestCase { \OC_User::clearBackends(); // needed for loginName2UserName mapping - $userBackend = $this->getMock('\OC\User\Database'); + $userBackend = $this->createMock(\OC\User\Database::class); \OC::$server->getUserManager()->registerBackend($userBackend); $userBackend->expects($this->once()) diff --git a/tests/lib/Files/Node/RootTest.php b/tests/lib/Files/Node/RootTest.php index 35ba8a6c22..534dd33032 100644 --- a/tests/lib/Files/Node/RootTest.php +++ b/tests/lib/Files/Node/RootTest.php @@ -141,7 +141,7 @@ class RootTest extends \Test\TestCase { \OC_User::clearBackends(); // needed for loginName2UserName mapping - $userBackend = $this->getMock('\OC\User\Database'); + $userBackend = $this->createMock(\OC\User\Database::class); \OC::$server->getUserManager()->registerBackend($userBackend); $userBackend->expects($this->any())