summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-06-21 18:53:10 +0200
committerRobin Appelman <icewind@owncloud.com>2012-06-21 18:53:10 +0200
commit49033ff8e0dd89d964264f269930b0587b8479c4 (patch)
tree1c8618f592323ea9ac9a6747a6fb9ac77c1ad5e0 /apps/files_encryption
parent6707e4187e4c1186eff8dfe06999c4539ab80de7 (diff)
downloadnextcloud-server-49033ff8e0dd89d964264f269930b0587b8479c4.tar.gz
nextcloud-server-49033ff8e0dd89d964264f269930b0587b8479c4.zip
dont change the encryption key during the test case
Diffstat (limited to 'apps/files_encryption')
-rw-r--r--apps/files_encryption/tests/proxy.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_encryption/tests/proxy.php b/apps/files_encryption/tests/proxy.php
index 4533289265a..fcfc4cfb9f0 100644
--- a/apps/files_encryption/tests/proxy.php
+++ b/apps/files_encryption/tests/proxy.php
@@ -8,10 +8,12 @@
class Test_CryptProxy extends UnitTestCase {
private $oldConfig;
+ private $oldKey;
public function setUp(){
$this->oldConfig=OCP\Config::getAppValue('files_encryption','enable_encryption','true');
OCP\Config::setAppValue('files_encryption','enable_encryption','true');
+ $this->oldKey=isset($_SESSION['enckey'])?$_SESSION['enckey']:null;
//set testing key
@@ -36,6 +38,9 @@ class Test_CryptProxy extends UnitTestCase {
public function tearDown(){
OCP\Config::setAppValue('files_encryption','enable_encryption',$this->oldConfig);
+ if(!is_null($this->oldKey)){
+ $_SESSION['enckey']=$this->oldKey;
+ }
}
public function testSimple(){