]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix BackgroundCleanupJobTest
authorCôme Chilliet <come.chilliet@nextcloud.com>
Wed, 8 Feb 2023 10:13:59 +0000 (11:13 +0100)
committerCôme Chilliet <come.chilliet@nextcloud.com>
Mon, 20 Mar 2023 09:21:44 +0000 (10:21 +0100)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
tests/lib/Preview/BackgroundCleanupJobTest.php

index c1c225bd17991af06a0bda37e80ec6c08db18923..aa15ea7f562d9c226094c690b0b29aa2b9b99caa 100644 (file)
@@ -69,7 +69,7 @@ class BackgroundCleanupJobTest extends \Test\TestCase {
                parent::setUp();
 
                $this->userId = $this->getUniqueID();
-               $this->createUser($this->userId, $this->userId);
+               $user = $this->createUser($this->userId, $this->userId);
 
                $storage = new \OC\Files\Storage\Temporary([]);
                $this->registerMount($this->userId, $storage, '');
@@ -79,7 +79,7 @@ class BackgroundCleanupJobTest extends \Test\TestCase {
                $this->loginAsUser($this->userId);
 
                $appManager = \OC::$server->getAppManager();
-               $this->trashEnabled = $appManager->isEnabledForUser('files_trashbin', $this->userId);
+               $this->trashEnabled = $appManager->isEnabledForUser('files_trashbin', $user);
                $appManager->disableApp('files_trashbin');
 
                $this->connection = \OC::$server->getDatabaseConnection();