diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-10-26 16:02:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-26 16:02:01 +0200 |
commit | c25b694fcafa3138d78645f81cc6ecd1d34d1656 (patch) | |
tree | fa1bebe361ee81a1c3e8ead10263af65610f6d97 /apps/encryption/tests/Crypto/EncryptionTest.php | |
parent | 06f46bd25614c080b75558e8372124142906d977 (diff) | |
parent | c733cdaa65ea473b848fb8329674145f54c1277b (diff) | |
download | nextcloud-server-c25b694fcafa3138d78645f81cc6ecd1d34d1656.tar.gz nextcloud-server-c25b694fcafa3138d78645f81cc6ecd1d34d1656.zip |
Merge pull request #6970 from nextcloud/class-usage-in-mocks-encryption-app
Use ::class in test mocks of encryption app
Diffstat (limited to 'apps/encryption/tests/Crypto/EncryptionTest.php')
-rw-r--r-- | apps/encryption/tests/Crypto/EncryptionTest.php | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php index 3bd4593d6bc..42da71b0eb1 100644 --- a/apps/encryption/tests/Crypto/EncryptionTest.php +++ b/apps/encryption/tests/Crypto/EncryptionTest.php @@ -23,7 +23,14 @@ namespace OCA\Encryption\Tests\Crypto; +use OCA\Encryption\Crypto\Crypt; +use OCA\Encryption\Crypto\DecryptAll; +use OCA\Encryption\Crypto\EncryptAll; use OCA\Encryption\Exceptions\PublicKeyMissingException; +use OCA\Encryption\KeyManager; +use OCA\Encryption\Session; +use OCA\Encryption\Util; +use OCP\Files\Storage; use OCP\IL10N; use OCP\ILogger; use Symfony\Component\Console\Input\InputInterface; @@ -66,24 +73,24 @@ class EncryptionTest extends TestCase { public function setUp() { parent::setUp(); - $this->storageMock = $this->getMockBuilder('OCP\Files\Storage') + $this->storageMock = $this->getMockBuilder(Storage::class) ->disableOriginalConstructor()->getMock(); - $this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt') + $this->cryptMock = $this->getMockBuilder(Crypt::class) ->disableOriginalConstructor() ->getMock(); - $this->utilMock = $this->getMockBuilder('OCA\Encryption\Util') + $this->utilMock = $this->getMockBuilder(Util::class) ->disableOriginalConstructor() ->getMock(); - $this->keyManagerMock = $this->getMockBuilder('OCA\Encryption\KeyManager') + $this->keyManagerMock = $this->getMockBuilder(KeyManager::class) ->disableOriginalConstructor() ->getMock(); - $this->sessionMock = $this->getMockBuilder('OCA\Encryption\Session') + $this->sessionMock = $this->getMockBuilder(Session::class) ->disableOriginalConstructor() ->getMock(); - $this->encryptAllMock = $this->getMockBuilder('OCA\Encryption\Crypto\EncryptAll') + $this->encryptAllMock = $this->getMockBuilder(EncryptAll::class) ->disableOriginalConstructor() ->getMock(); - $this->decryptAllMock = $this->getMockBuilder('OCA\Encryption\Crypto\DecryptAll') + $this->decryptAllMock = $this->getMockBuilder(DecryptAll::class) ->disableOriginalConstructor() ->getMock(); $this->loggerMock = $this->getMockBuilder(ILogger::class) |