]> source.dussan.org Git - nextcloud-server.git/commitdiff
Disable trashbin when testing orphaned shares deletion job
authorVincent Petry <pvince81@owncloud.com>
Wed, 8 Apr 2015 11:04:06 +0000 (13:04 +0200)
committerVincent Petry <pvince81@owncloud.com>
Wed, 8 Apr 2015 11:04:06 +0000 (13:04 +0200)
apps/files_sharing/tests/deleteorphanedsharesjobtest.php

index ec9d5f089bb2a29b2c2ef75d0f5ee71a19db8871..e1c6a6f6ad3732d50924f091cbd49bef7cd5b035 100644 (file)
@@ -26,6 +26,11 @@ use OCA\Files_sharing\Lib\DeleteOrphanedSharesJob;
 
 class DeleteOrphanedSharesJobTest extends \Test\TestCase {
 
+       /**
+        * @var bool
+        */
+       private static $trashBinStatus;
+
        /**
         * @var DeleteOrphanedSharesJob
         */
@@ -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();