Skip to content
Snippets Groups Projects
Commit 49033ff8 authored by Robin Appelman's avatar Robin Appelman
Browse files

dont change the encryption key during the test case

parent 6707e418
No related branches found
No related tags found
No related merge requests found
......@@ -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(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment