diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-04-08 13:04:06 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-04-08 13:04:06 +0200 |
commit | 4acf6747d285bd4a15717c2c6a73c5a308134131 (patch) | |
tree | 688364c2920e339290ae4bbebec3f4ced1e43121 /apps | |
parent | 9c3893ce69af6245f3b442fe18ff75ef252eabbd (diff) | |
download | nextcloud-server-4acf6747d285bd4a15717c2c6a73c5a308134131.tar.gz nextcloud-server-4acf6747d285bd4a15717c2c6a73c5a308134131.zip |
Disable trashbin when testing orphaned shares deletion job
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/tests/deleteorphanedsharesjobtest.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/files_sharing/tests/deleteorphanedsharesjobtest.php b/apps/files_sharing/tests/deleteorphanedsharesjobtest.php index ec9d5f089bb..e1c6a6f6ad3 100644 --- a/apps/files_sharing/tests/deleteorphanedsharesjobtest.php +++ b/apps/files_sharing/tests/deleteorphanedsharesjobtest.php @@ -27,6 +27,11 @@ use OCA\Files_sharing\Lib\DeleteOrphanedSharesJob; class DeleteOrphanedSharesJobTest extends \Test\TestCase { /** + * @var bool + */ + private static $trashBinStatus; + + /** * @var DeleteOrphanedSharesJob */ private $job; @@ -46,6 +51,18 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase { */ private $user2; + public static function setUpBeforeClass() { + $appManager = \OC::$server->getAppManager(); + self::$trashBinStatus = $appManager->isEnabledForUser('files_trashbin'); + $appManager->disableApp('files_trashbin'); + } + + public static function tearDownAfterClass() { + if (self::$trashBinStatus) { + \OC::$server->getAppManager()->enableApp('files_trashbin'); + } + } + protected function setup() { parent::setUp(); |