diff options
author | Sebastian L <sl@momou.ch> | 2021-05-05 10:01:29 +0300 |
---|---|---|
committer | Sebastian L <sl@momou.ch> | 2021-05-07 12:54:28 +0300 |
commit | 37fba2795ba5be7b3306f9abdd671d2821fccad1 (patch) | |
tree | 2884c8220a78169a5f7e133066faacdab5969ad5 /tests | |
parent | f549e525bcce69fafbf12c6e938bdf8ea49d2d8a (diff) |
Provide multiple STUN servers to webrtc client
- Provide multiple STUN servers to webrtc client when specified in
nextcloud backend instead of just 1 random one
Signed-off-by: Sebastian L <sl@momou.ch>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/php/ConfigTest.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/php/ConfigTest.php b/tests/php/ConfigTest.php index c533e36f2..0cb2d9d95 100644 --- a/tests/php/ConfigTest.php +++ b/tests/php/ConfigTest.php @@ -29,7 +29,7 @@ use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class ConfigTest extends TestCase { - public function testGetStunServer() { + public function testGetStunServers() { $servers = [ 'stun1.example.com:443', 'stun2.example.com:129', @@ -55,7 +55,7 @@ class ConfigTest extends TestCase { ->willReturn(true); $helper = new Config($config, $secureRandom, $groupManager, $timeFactory); - $this->assertTrue(in_array($helper->getStunServer(), $servers, true)); + $this->assertSame($helper->getStunServers(), $servers); } public function testGetDefaultStunServer() { @@ -79,7 +79,7 @@ class ConfigTest extends TestCase { ->willReturn(true); $helper = new Config($config, $secureRandom, $groupManager, $timeFactory); - $this->assertSame('stun.nextcloud.com:443', $helper->getStunServer()); + $this->assertSame(['stun.nextcloud.com:443'], $helper->getStunServers()); } public function testGetDefaultStunServerNoInternet() { @@ -103,7 +103,7 @@ class ConfigTest extends TestCase { ->willReturn(false); $helper = new Config($config, $secureRandom, $groupManager, $timeFactory); - $this->assertSame('', $helper->getStunServer()); + $this->assertSame([], $helper->getStunServers()); } public function testGenerateTurnSettings() { |