summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2023-01-13 14:56:13 -0300
committerVitor Mattos <vitor@php.rio>2023-01-14 10:02:23 -0300
commitf44a9f7662dbdcb2b0dddd2a18566378e897e7e8 (patch)
tree5814d3e44bf7212d14ef3a690999ef68ad4845eb /tests
parent71aa1692c51ea845e70e74f498e201748fd10702 (diff)
Fix unit tests
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'tests')
-rw-r--r--tests/php/Notification/NotifierTest.php4
-rw-r--r--tests/php/Service/RecordingServiceTest.php16
2 files changed, 13 insertions, 7 deletions
diff --git a/tests/php/Notification/NotifierTest.php b/tests/php/Notification/NotifierTest.php
index 6ec9a77c6..058de1905 100644
--- a/tests/php/Notification/NotifierTest.php
+++ b/tests/php/Notification/NotifierTest.php
@@ -73,6 +73,8 @@ class NotifierTest extends TestCase {
protected $commentsManager;
/** @var MessageParser|MockObject */
protected $messageParser;
+ /** @var IURLGenerator|MockObject */
+ protected $urlGenerator;
/** @var ITimeFactory|MockObject */
protected $timeFactory;
/** @var Definitions|MockObject */
@@ -95,6 +97,7 @@ class NotifierTest extends TestCase {
$this->notificationManager = $this->createMock(INotificationManager::class);
$this->commentsManager = $this->createMock(CommentsManager::class);
$this->messageParser = $this->createMock(MessageParser::class);
+ $this->urlGenerator = $this->createMock(IURLGenerator::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->definitions = $this->createMock(Definitions::class);
$this->addressHandler = $this->createMock(AddressHandler::class);
@@ -111,6 +114,7 @@ class NotifierTest extends TestCase {
$this->notificationManager,
$this->commentsManager,
$this->messageParser,
+ $this->urlGenerator,
$this->timeFactory,
$this->definitions,
$this->addressHandler
diff --git a/tests/php/Service/RecordingServiceTest.php b/tests/php/Service/RecordingServiceTest.php
index 6dbf56867..97d5076ee 100644
--- a/tests/php/Service/RecordingServiceTest.php
+++ b/tests/php/Service/RecordingServiceTest.php
@@ -39,10 +39,9 @@ use OCA\Talk\Config;
use OCA\Talk\Service\ParticipantService;
use OCA\Talk\Service\RecordingService;
use OCA\Talk\Service\RoomService;
+use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Files\IMimeTypeDetector;
use OCP\Files\IRootFolder;
-use OCP\IL10N;
-use OCP\IURLGenerator;
use OCP\Notification\IManager;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
@@ -56,6 +55,10 @@ class RecordingServiceTest extends TestCase {
private $rootFolder;
/** @var Config|MockObject */
private $config;
+ /** @var IManager|MockObject */
+ private $notificationManager;
+ /** @var ITimeFactory|MockObject */
+ private $timeFactory;
/** @var RoomService|MockObject */
private $roomService;
/** @var RecordingService */
@@ -68,8 +71,7 @@ class RecordingServiceTest extends TestCase {
$this->participantService = $this->createMock(ParticipantService::class);
$this->rootFolder = $this->createMock(IRootFolder::class);
$this->notificationManager = $this->createMock(IManager::class);
- $this->l = $this->createMock(IL10N::class);
- $this->urlGenerator = $this->createMock(IURLGenerator::class);
+ $this->timeFactory = $this->createMock(ITimeFactory::class);
$this->config = $this->createMock(Config::class);
$this->roomService = $this->createMock(RoomService::class);
@@ -78,9 +80,9 @@ class RecordingServiceTest extends TestCase {
$this->participantService,
$this->rootFolder,
$this->notificationManager,
- $this->l,
- $this->urlGenerator,
- $this->config
+ $this->timeFactory,
+ $this->config,
+ $this->roomService
);
}