Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-22 11:33:18 +0300
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-22 11:33:18 +0300
commit27d6852b3ead63454d3cf0f3c79372af6852f9ac (patch)
treee96e037bdd0c900ec16ede1ab8d4fa923e11fa76 /tests
parent81b5df32365123d2c9b8a912f7ec47d1d3b29b5a (diff)
parentdf544e8dbeddb11225a5d55a04038e42cfa5eecf (diff)
Merge pull request #24131 from owncloud/dont-transfer-files-to-not-ready-user-stable9
[9.0] Introduce isReadyForUser and verify in file transfer ownership
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/storage/wrapper/encryption.php9
-rw-r--r--tests/lib/files/stream/encryption.php2
2 files changed, 6 insertions, 5 deletions
diff --git a/tests/lib/files/storage/wrapper/encryption.php b/tests/lib/files/storage/wrapper/encryption.php
index 651299a3eab..21f7d9f09b9 100644
--- a/tests/lib/files/storage/wrapper/encryption.php
+++ b/tests/lib/files/storage/wrapper/encryption.php
@@ -5,6 +5,7 @@ namespace Test\Files\Storage\Wrapper;
use OC\Encryption\Util;
use OC\Files\Storage\Temporary;
use OC\Files\View;
+use OC\User\Manager;
use Test\Files\Storage\Storage;
class Encryption extends Storage {
@@ -118,7 +119,7 @@ class Encryption extends Storage {
$this->util = $this->getMock(
'\OC\Encryption\Util',
['getUidAndFilename', 'isFile', 'isExcluded'],
- [new View(), new \OC\User\Manager(), $this->groupManager, $this->config, $this->arrayCache]);
+ [new View(), new Manager(), $this->groupManager, $this->config, $this->arrayCache]);
$this->util->expects($this->any())
->method('getUidAndFilename')
->willReturnCallback(function ($path) {
@@ -200,7 +201,7 @@ class Encryption extends Storage {
protected function buildMockModule() {
$this->encryptionModule = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule')
->disableOriginalConstructor()
- ->setMethods(['getId', 'getDisplayName', 'begin', 'end', 'encrypt', 'decrypt', 'update', 'shouldEncrypt', 'getUnencryptedBlockSize', 'isReadable', 'encryptAll', 'prepareDecryptAll'])
+ ->setMethods(['getId', 'getDisplayName', 'begin', 'end', 'encrypt', 'decrypt', 'update', 'shouldEncrypt', 'getUnencryptedBlockSize', 'isReadable', 'encryptAll', 'prepareDecryptAll', 'isReadyForUser'])
->getMock();
$this->encryptionModule->expects($this->any())->method('getId')->willReturn('UNIT_TEST_MODULE');
@@ -543,7 +544,7 @@ class Encryption extends Storage {
->setConstructorArgs(
[
new View(),
- new \OC\User\Manager(),
+ new Manager(),
$this->groupManager,
$this->config,
$this->arrayCache
@@ -608,7 +609,7 @@ class Encryption extends Storage {
->disableOriginalConstructor()->getMock();
$util = $this->getMockBuilder('\OC\Encryption\Util')
- ->setConstructorArgs([new View(), new \OC\User\Manager(), $this->groupManager, $this->config, $this->arrayCache])
+ ->setConstructorArgs([new View(), new Manager(), $this->groupManager, $this->config, $this->arrayCache])
->getMock();
$cache = $this->getMockBuilder('\OC\Files\Cache\Cache')
diff --git a/tests/lib/files/stream/encryption.php b/tests/lib/files/stream/encryption.php
index afb31f2822d..20a4100d2ff 100644
--- a/tests/lib/files/stream/encryption.php
+++ b/tests/lib/files/stream/encryption.php
@@ -311,7 +311,7 @@ class Encryption extends \Test\TestCase {
protected function buildMockModule() {
$encryptionModule = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule')
->disableOriginalConstructor()
- ->setMethods(['getId', 'getDisplayName', 'begin', 'end', 'encrypt', 'decrypt', 'update', 'shouldEncrypt', 'getUnencryptedBlockSize', 'isReadable', 'encryptAll', 'prepareDecryptAll'])
+ ->setMethods(['getId', 'getDisplayName', 'begin', 'end', 'encrypt', 'decrypt', 'update', 'shouldEncrypt', 'getUnencryptedBlockSize', 'isReadable', 'encryptAll', 'prepareDecryptAll', 'isReadyForUser'])
->getMock();
$encryptionModule->expects($this->any())->method('getId')->willReturn('UNIT_TEST_MODULE');