Disable trashbin when testing orphaned shares deletion job
This commit is contained in:
parent
9c3893ce69
commit
4acf6747d2
|
@ -26,6 +26,11 @@ use OCA\Files_sharing\Lib\DeleteOrphanedSharesJob;
|
||||||
|
|
||||||
class DeleteOrphanedSharesJobTest extends \Test\TestCase {
|
class DeleteOrphanedSharesJobTest extends \Test\TestCase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
private static $trashBinStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var DeleteOrphanedSharesJob
|
* @var DeleteOrphanedSharesJob
|
||||||
*/
|
*/
|
||||||
|
@ -46,6 +51,18 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase {
|
||||||
*/
|
*/
|
||||||
private $user2;
|
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() {
|
protected function setup() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue