diff options
author | skjnldsv <skjnldsv@protonmail.com> | 2024-06-06 19:36:19 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-06-12 11:06:10 +0000 |
commit | 732780381641a1ba535a90796a3e99726ee694c9 (patch) | |
tree | 7805e73a4f3afb191962a652365ffc5fa2011046 /tests | |
parent | 697f9032cf510bb70885ded449f64f85a232ae51 (diff) | |
download | nextcloud-server-732780381641a1ba535a90796a3e99726ee694c9.tar.gz nextcloud-server-732780381641a1ba535a90796a3e99726ee694c9.zip |
fix(files_sharing): dark avatar support
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Core/Controller/AvatarControllerTest.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/Core/Controller/AvatarControllerTest.php b/tests/Core/Controller/AvatarControllerTest.php index 256f5665795..19221caf972 100644 --- a/tests/Core/Controller/AvatarControllerTest.php +++ b/tests/Core/Controller/AvatarControllerTest.php @@ -33,6 +33,7 @@ namespace Tests\Core\Controller; use OC\AppFramework\Utility\TimeFactory; use OC\Core\Controller\AvatarController; +use OC\Core\Controller\GuestAvatarController; use OCP\AppFramework\Http; use OCP\Files\File; use OCP\Files\IRootFolder; @@ -56,13 +57,15 @@ use Psr\Log\LoggerInterface; class AvatarControllerTest extends \Test\TestCase { /** @var AvatarController */ private $avatarController; + /** @var GuestAvatarController */ + private $guestAvatarController; + /** @var IAvatar|\PHPUnit\Framework\MockObject\MockObject */ private $avatarMock; /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */ private $userMock; /** @var ISimpleFile|\PHPUnit\Framework\MockObject\MockObject */ private $avatarFile; - /** @var IAvatarManager|\PHPUnit\Framework\MockObject\MockObject */ private $avatarManager; /** @var ICache|\PHPUnit\Framework\MockObject\MockObject */ @@ -97,6 +100,13 @@ class AvatarControllerTest extends \Test\TestCase { $this->avatarMock = $this->getMockBuilder('OCP\IAvatar')->getMock(); $this->userMock = $this->getMockBuilder(IUser::class)->getMock(); + $this->guestAvatarController = new GuestAvatarController( + 'core', + $this->request, + $this->avatarManager, + $this->logger + ); + $this->avatarController = new AvatarController( 'core', $this->request, @@ -107,7 +117,8 @@ class AvatarControllerTest extends \Test\TestCase { $this->rootFolder, $this->logger, 'userid', - $this->timeFactory + $this->timeFactory, + $this->guestAvatarController, ); // Configure userMock |