diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-06-21 20:53:10 +0400 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-06-21 20:53:52 +0400 |
commit | 46ad51cbe2501ef37603b186ae07886a5186c342 (patch) | |
tree | 51b18d9b0a44ac44efc6bf09ecdf353326ed4f5f | |
parent | bd8b921de4dac02463fa5b0099a22db4c45cd4f8 (diff) |
dont change the encryption key during the test case
-rw-r--r-- | apps/files_encryption/tests/proxy.php | 5 |
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(){ |