diff options
Diffstat (limited to 'apps/encryption/tests/UtilTest.php')
-rw-r--r-- | apps/encryption/tests/UtilTest.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/encryption/tests/UtilTest.php b/apps/encryption/tests/UtilTest.php index 84a9ad493d7..d2f1d40e16d 100644 --- a/apps/encryption/tests/UtilTest.php +++ b/apps/encryption/tests/UtilTest.php @@ -26,7 +26,12 @@ namespace OCA\Encryption\Tests; +use OC\Files\View; use OCA\Encryption\Util; +use OCP\Files\Mount\IMountPoint; +use OCP\IConfig; +use OCP\ILogger; +use OCP\IUserManager; use Test\TestCase; class UtilTest extends TestCase { @@ -70,16 +75,16 @@ class UtilTest extends TestCase { protected function setUp() { parent::setUp(); - $this->mountMock = $this->getMock('\OCP\Files\Mount\IMountPoint'); - $this->filesMock = $this->getMock('OC\Files\View'); - $this->userManagerMock = $this->getMock('\OCP\IUserManager'); + $this->mountMock = $this->createMock(IMountPoint::class); + $this->filesMock = $this->createMock(View::class); + $this->userManagerMock = $this->createMock(IUserManager::class); /** @var \OCA\Encryption\Crypto\Crypt $cryptMock */ $cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt') ->disableOriginalConstructor() ->getMock(); /** @var \OCP\ILogger $loggerMock */ - $loggerMock = $this->getMock('OCP\ILogger'); + $loggerMock = $this->createMock(ILogger::class); /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject $userSessionMock */ $userSessionMock = $this->getMockBuilder('OCP\IUserSession') ->disableOriginalConstructor() @@ -102,7 +107,7 @@ class UtilTest extends TestCase { ->will($this->returnSelf()); - $this->configMock = $this->getMock('OCP\IConfig'); + $this->configMock = $this->createMock(IConfig::class); $this->configMock->expects($this->any()) ->method('getUserValue') |