diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-06-12 16:30:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-12 16:30:45 +0200 |
commit | b9857b9a7fd5284d23f27e3f9a92696b25cd58ae (patch) | |
tree | bfe66c06a61e921f49315f51a689b01d8a820ca1 /tests | |
parent | b54668be3583d01c2c57c43d52df7466669f54c6 (diff) | |
parent | b0c83ae91e759d1023f0107bbd442e56c02515db (diff) | |
download | nextcloud-server-b9857b9a7fd5284d23f27e3f9a92696b25cd58ae.tar.gz nextcloud-server-b9857b9a7fd5284d23f27e3f9a92696b25cd58ae.zip |
Merge pull request #45817 from nextcloud/backport/45698/stable28
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 |