summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-09-19 20:14:34 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2013-09-19 20:14:34 +0200
commit57092e817f3bb45c4ca030ba135d5f8c7d2a096b (patch)
treed0b32651f6dc8c24f1aa3743cb6fac5c1c534d8d /apps
parent39920955f25f7b7f04395324b886d361725436ed (diff)
downloadnextcloud-server-57092e817f3bb45c4ca030ba135d5f8c7d2a096b.tar.gz
nextcloud-server-57092e817f3bb45c4ca030ba135d5f8c7d2a096b.zip
disable encryption app for share API tests
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/tests/api.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php
index e9d689ed43e..3597fbec617 100644
--- a/apps/files_sharing/tests/api.php
+++ b/apps/files_sharing/tests/api.php
@@ -32,6 +32,7 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
+ public $stateFilesEncryption;
public $filename;
public $data;
/**
@@ -68,11 +69,24 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
$this->view->file_put_contents($this->filename, $this->data);
$this->view->mkdir($this->folder);
$this->view->file_put_contents($this->folder.'/'.$this->filename, $this->data);
+
+
+ // remember files_encryption state
+ $this->stateFilesEncryption = OC_App::isEnabled('files_encryption');
+
+ // we don't want to tests with app files_encryption enabled
+ \OC_App::disable('files_encryption');
}
function tearDown() {
$this->view->unlink($this->filename);
$this->view->deleteAll($this->folder);
+ // reset app files_trashbin
+ if ($this->stateFilesTrashbin) {
+ OC_App::enable('files_encryption');
+ } else {
+ OC_App::disable('files_encryption');
+ }
}
public static function tearDownAfterClass() {