diff options
Diffstat (limited to 'tests/php')
-rw-r--r-- | tests/php/Chat/ChatManagerTest.php | 11 | ||||
-rw-r--r-- | tests/php/Controller/ChatControllerTest.php | 5 |
2 files changed, 14 insertions, 2 deletions
diff --git a/tests/php/Chat/ChatManagerTest.php b/tests/php/Chat/ChatManagerTest.php index 78f9cf693..7145ef8ab 100644 --- a/tests/php/Chat/ChatManagerTest.php +++ b/tests/php/Chat/ChatManagerTest.php @@ -31,6 +31,7 @@ use OCA\Talk\Model\Attendee; use OCA\Talk\Model\AttendeeMapper; use OCA\Talk\Participant; use OCA\Talk\Room; +use OCA\Talk\Service\AttachmentService; use OCA\Talk\Service\ParticipantService; use OCA\Talk\Share\RoomShareProvider; use OCP\AppFramework\Utility\ITimeFactory; @@ -67,6 +68,8 @@ class ChatManagerTest extends TestCase { protected $notifier; /** @var ITimeFactory|MockObject */ protected $timeFactory; + /** @var AttachmentService|MockObject */ + protected $attachmentService; /** @var ChatManager */ protected $chatManager; @@ -81,6 +84,7 @@ class ChatManagerTest extends TestCase { $this->participantService = $this->createMock(ParticipantService::class); $this->notifier = $this->createMock(Notifier::class); $this->timeFactory = $this->createMock(ITimeFactory::class); + $this->attachmentService = $this->createMock(AttachmentService::class); $cacheFactory = $this->createMock(ICacheFactory::class); $this->chatManager = new ChatManager( @@ -93,7 +97,8 @@ class ChatManagerTest extends TestCase { $this->participantService, $this->notifier, $cacheFactory, - $this->timeFactory + $this->timeFactory, + $this->attachmentService ); } @@ -117,6 +122,7 @@ class ChatManagerTest extends TestCase { $this->notifier, $cacheFactory, $this->timeFactory, + $this->attachmentService, ]) ->onlyMethods($methods) ->getMock(); @@ -132,7 +138,8 @@ class ChatManagerTest extends TestCase { $this->participantService, $this->notifier, $cacheFactory, - $this->timeFactory + $this->timeFactory, + $this->attachmentService ); } diff --git a/tests/php/Controller/ChatControllerTest.php b/tests/php/Controller/ChatControllerTest.php index 92473c7fd..ba24bf7f2 100644 --- a/tests/php/Controller/ChatControllerTest.php +++ b/tests/php/Controller/ChatControllerTest.php @@ -33,6 +33,7 @@ use OCA\Talk\Model\Attendee; use OCA\Talk\Model\Message; use OCA\Talk\Participant; use OCA\Talk\Room; +use OCA\Talk\Service\AttachmentService; use OCA\Talk\Service\ParticipantService; use OCA\Talk\Service\SessionService; use OCP\App\IAppManager; @@ -68,6 +69,8 @@ class ChatControllerTest extends TestCase { protected $participantService; /** @var SessionService|MockObject */ protected $sessionService; + /** @var AttachmentService|MockObject */ + protected $attachmentService; /** @var GuestManager|MockObject */ protected $guestManager; /** @var MessageParser|MockObject */ @@ -111,6 +114,7 @@ class ChatControllerTest extends TestCase { $this->chatManager = $this->createMock(ChatManager::class); $this->participantService = $this->createMock(ParticipantService::class); $this->sessionService = $this->createMock(SessionService::class); + $this->attachmentService = $this->createMock(AttachmentService::class); $this->guestManager = $this->createMock(GuestManager::class); $this->messageParser = $this->createMock(MessageParser::class); $this->autoCompleteManager = $this->createMock(IManager::class); @@ -146,6 +150,7 @@ class ChatControllerTest extends TestCase { $this->chatManager, $this->participantService, $this->sessionService, + $this->attachmentService, $this->guestManager, $this->messageParser, $this->autoCompleteManager, |