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:
authorMorris Jobke <hey@morrisjobke.de>2020-05-14 22:57:14 +0300
committerJoas Schilling <coding@schilljs.com>2020-06-10 17:26:49 +0300
commit93220650a1f40c639f324a3f6f5e51ae4293517f (patch)
tree7962e5760e397cce4d2976c5680e613e83fb8628 /tests
parenta0294ea87e6bad85ff31f1425d5fc4b05a8f55ae (diff)
First UI version of form for signaling server trial
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/php/Settings/Admin/AdminSettingsTest.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/php/Settings/Admin/AdminSettingsTest.php b/tests/php/Settings/Admin/AdminSettingsTest.php
index ee01a019d..669b5ceb8 100644
--- a/tests/php/Settings/Admin/AdminSettingsTest.php
+++ b/tests/php/Settings/Admin/AdminSettingsTest.php
@@ -29,6 +29,7 @@ use OCA\Talk\Settings\Admin\AdminSettings;
use OCP\ICacheFactory;
use OCP\IConfig;
use OCP\IInitialStateService;
+use OCP\IUserSession;
use PHPUnit\Framework\MockObject\MockObject;
class AdminSettingsTest extends \Test\TestCase {
@@ -45,6 +46,8 @@ class AdminSettingsTest extends \Test\TestCase {
protected $cacheFactory;
/** @var AdminSettings */
protected $admin;
+ /** @var IUserSession|MockObject */
+ protected $userSession;
public function setUp(): void {
parent::setUp();
@@ -54,6 +57,7 @@ class AdminSettingsTest extends \Test\TestCase {
$this->commandService = $this->createMock(CommandService::class);
$this->initialState = $this->createMock(IInitialStateService::class);
$this->cacheFactory = $this->createMock(ICacheFactory::class);
+ $this->userSession = $this->createMock(IUserSession::class);
$this->admin = $this->getAdminSettings();
}
@@ -69,7 +73,8 @@ class AdminSettingsTest extends \Test\TestCase {
$this->serverConfig,
$this->commandService,
$this->initialState,
- $this->cacheFactory
+ $this->cacheFactory,
+ $this->userSession
);
}
@@ -80,6 +85,7 @@ class AdminSettingsTest extends \Test\TestCase {
$this->commandService,
$this->initialState,
$this->cacheFactory,
+ $this->userSession,
])
->onlyMethods($methods)
->getMock();
@@ -102,7 +108,8 @@ class AdminSettingsTest extends \Test\TestCase {
'initCommands',
'initStunServers',
'initTurnServers',
- 'initSignalingServers'
+ 'initSignalingServers',
+ 'initRequestSignalingServerTrial',
]);
$admin->expects($this->once())
@@ -117,6 +124,8 @@ class AdminSettingsTest extends \Test\TestCase {
->method('initTurnServers');
$admin->expects($this->once())
->method('initSignalingServers');
+ $admin->expects($this->once())
+ ->method('initRequestSignalingServerTrial');
$form = $admin->getForm();
$this->assertSame('settings/admin-settings', $form->getTemplateName());