summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-09-19 19:03:27 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-09-22 15:42:13 +0200
commita5a8f4e9efe58fa945293fb0332d238d8e374fc2 (patch)
treed4faba92594aae6d17a2329bc064128832d47739 /tests
parent9366ec0fb8aba7a42887f6acfad85243995c9a12 (diff)
downloadnextcloud-server-a5a8f4e9efe58fa945293fb0332d238d8e374fc2.tar.gz
nextcloud-server-a5a8f4e9efe58fa945293fb0332d238d8e374fc2.zip
Move avatar clearing in the background
Signed-off-by: Carl Schwan <carl@carlschwan.eu> (cherry picked from commit e21e53670c60b74ca2c49c01bf510ccdc5115b0d)
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Repair/ClearGeneratedAvatarCacheTest.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php b/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php
index de4c6179610..71842547462 100644
--- a/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php
+++ b/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php
@@ -25,6 +25,7 @@ namespace Test\Repair;
use OC\Avatar\AvatarManager;
use OC\Repair\ClearGeneratedAvatarCache;
+use OCP\BackgroundJob\IJobList;
use OCP\IConfig;
use OCP\Migration\IOutput;
@@ -39,8 +40,10 @@ class ClearGeneratedAvatarCacheTest extends \Test\TestCase {
/** @var IConfig */
private $config;
- /** @var ClearGeneratedAvatarCache */
- protected $repair;
+ /** @var IJobList */
+ private $jobList;
+
+ protected ClearGeneratedAvatarCache $repair;
protected function setUp(): void {
parent::setUp();
@@ -48,8 +51,9 @@ class ClearGeneratedAvatarCacheTest extends \Test\TestCase {
$this->outputMock = $this->createMock(IOutput::class);
$this->avatarManager = $this->createMock(AvatarManager::class);
$this->config = $this->createMock(IConfig::class);
+ $this->jobList = $this->createMock(IJobList::class);
- $this->repair = new ClearGeneratedAvatarCache($this->config, $this->avatarManager);
+ $this->repair = new ClearGeneratedAvatarCache($this->config, $this->avatarManager, $this->jobList);
}
public function shouldRunDataProvider() {