Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-05-12 15:18:30 +0300
committerJoas Schilling <coding@schilljs.com>2020-05-12 15:18:30 +0300
commit76294947900acb3c28cca9d3c7cebc3aa1711293 (patch)
tree050592a732f0ef44e101496c9a960b3ac74c7ce2 /tests
parent40fa7c6f21ecf204de44320752d4adbf2ff817cb (diff)
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/php/Controller/SignalingControllerTest.php4
-rw-r--r--tests/php/RoomTest.php1
-rw-r--r--tests/php/Signaling/BackendNotifierTest.php10
3 files changed, 14 insertions, 1 deletions
diff --git a/tests/php/Controller/SignalingControllerTest.php b/tests/php/Controller/SignalingControllerTest.php
index 67a404a0b..7e72e27c7 100644
--- a/tests/php/Controller/SignalingControllerTest.php
+++ b/tests/php/Controller/SignalingControllerTest.php
@@ -69,6 +69,8 @@ class SignalingControllerTest extends \Test\TestCase {
private $config;
/** @var TalkSession|MockObject */
private $session;
+ /** @var \OCA\Talk\Signaling\Manager|MockObject */
+ private $signalingManager;
/** @var Manager|MockObject */
protected $manager;
/** @var IDBConnection|MockObject */
@@ -107,6 +109,7 @@ class SignalingControllerTest extends \Test\TestCase {
$this->config = new Config($config, $this->secureRandom, $groupManager, $timeFactory);
$this->session = $this->createMock(TalkSession::class);
$this->dbConnection = \OC::$server->getDatabaseConnection();
+ $this->signalingManager = $this->createMock(\OCA\Talk\Signaling\Manager::class);
$this->manager = $this->createMock(Manager::class);
$this->messages = $this->createMock(Messages::class);
$this->userManager = $this->createMock(IUserManager::class);
@@ -121,6 +124,7 @@ class SignalingControllerTest extends \Test\TestCase {
'spreed',
$this->createMock(\OCP\IRequest::class),
$this->config,
+ $this->signalingManager,
$this->session,
$this->manager,
$this->dbConnection,
diff --git a/tests/php/RoomTest.php b/tests/php/RoomTest.php
index 7a3f3fff4..e240c0db2 100644
--- a/tests/php/RoomTest.php
+++ b/tests/php/RoomTest.php
@@ -65,6 +65,7 @@ class RoomTest extends TestCase {
Room::PUBLIC_CALL,
Room::READ_WRITE,
Webinary::LOBBY_NONE,
+ null,
'foobar',
'Test',
'passy',
diff --git a/tests/php/Signaling/BackendNotifierTest.php b/tests/php/Signaling/BackendNotifierTest.php
index 37676eabf..fda09243b 100644
--- a/tests/php/Signaling/BackendNotifierTest.php
+++ b/tests/php/Signaling/BackendNotifierTest.php
@@ -77,6 +77,8 @@ class BackendNotifierTest extends \Test\TestCase {
private $secureRandom;
/** @var ITimeFactory|MockObject */
private $timeFactory;
+ /** @var \OCA\Talk\Signaling\Manager|MockObject */
+ private $signalingManager;
/** @var CustomBackendNotifier */
private $controller;
@@ -116,6 +118,11 @@ class BackendNotifierTest extends \Test\TestCase {
],
]));
+ $this->signalingManager = $this->createMock(\OCA\Talk\Signaling\Manager::class);
+ $this->signalingManager->expects($this->any())
+ ->method('getSignalingServerForConversation')
+ ->willReturn(['server' => $this->baseUrl]);
+
$this->config = new Config($config, $this->secureRandom, $groupManager, $this->timeFactory);
$this->recreateBackendNotifier();
@@ -158,7 +165,8 @@ class BackendNotifierTest extends \Test\TestCase {
$this->config,
$this->createMock(ILogger::class),
$this->createMock(IClientService::class),
- $this->secureRandom
+ $this->secureRandom,
+ $this->signalingManager
);
}