diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-20 11:24:18 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-20 11:24:18 +0200 |
commit | bd09910f67f3bf1928d0dad803e32621d4fc030f (patch) | |
tree | 7bcd170b3fcc1942e16564d0c28845ee4dba20a2 /apps | |
parent | 96c27ead9256999f3bcdf0647a77589851acd381 (diff) | |
download | nextcloud-server-bd09910f67f3bf1928d0dad803e32621d4fc030f.tar.gz nextcloud-server-bd09910f67f3bf1928d0dad803e32621d4fc030f.zip |
disable encrpytion app before performing tests
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/tests/api.php | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php index 3597fbec617..6abc6fc63ea 100644 --- a/apps/files_sharing/tests/api.php +++ b/apps/files_sharing/tests/api.php @@ -61,31 +61,34 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase { $this->data = 'foobar'; $this->view = new \OC_FilesystemView('/' . \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1 . '/files'); - $this->folder = '/folder'; + $this->folder = '/folder_share_api_test'; $this->filename = 'share-api-test.txt'; + // 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'); + + + $this->assertTrue(!\OC_App::isEnabled('files_encryption')); + // save file with content $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'); + // reset app files_encryption + if ($this->stateFilesEncryption) { + \OC_App::enable('files_encryption'); } else { - OC_App::disable('files_encryption'); + \OC_App::disable('files_encryption'); } } |