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:
authorVitor Mattos <vitor@php.rio>2021-10-13 12:14:15 +0300
committerVitor Mattos <vitor@php.rio>2021-10-13 12:14:15 +0300
commit4b1afac376a1abf0dde7eb3958bb0720bc792a21 (patch)
treed34d1039c2ce52c8cb20bbdf3f95218c836abd85 /tests
parentc8a42e78a80cd668c08f8f486a72ee7375f838ec (diff)
Replace deprecated method and remove double to nonexistent method
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'tests')
-rw-r--r--tests/php/Activity/Provider/BaseTest.php2
-rw-r--r--tests/php/Activity/Provider/InvitationTest.php4
-rw-r--r--tests/php/Chat/ChatManagerTest.php2
-rw-r--r--tests/php/Chat/Command/ExecutorTest.php2
-rw-r--r--tests/php/Chat/Command/ShellExecutorTest.php4
-rw-r--r--tests/php/Chat/Parser/SystemMessageTest.php2
-rw-r--r--tests/php/Command/Signaling/ListCommandTest.php2
-rw-r--r--tests/php/Command/Stun/ListCommandTest.php2
-rw-r--r--tests/php/Command/Turn/AddTest.php2
-rw-r--r--tests/php/Command/Turn/ListCommandTest.php2
10 files changed, 12 insertions, 12 deletions
diff --git a/tests/php/Activity/Provider/BaseTest.php b/tests/php/Activity/Provider/BaseTest.php
index 253d8177b..f958c2045 100644
--- a/tests/php/Activity/Provider/BaseTest.php
+++ b/tests/php/Activity/Provider/BaseTest.php
@@ -80,7 +80,7 @@ class BaseTest extends TestCase {
$this->userManager,
$this->manager,
])
- ->setMethods($methods)
+ ->onlyMethods($methods)
->getMock();
}
diff --git a/tests/php/Activity/Provider/InvitationTest.php b/tests/php/Activity/Provider/InvitationTest.php
index 9f382c51f..a8c07899e 100644
--- a/tests/php/Activity/Provider/InvitationTest.php
+++ b/tests/php/Activity/Provider/InvitationTest.php
@@ -82,7 +82,7 @@ class InvitationTest extends TestCase {
$this->userManager,
$this->manager,
])
- ->setMethods($methods)
+ ->onlyMethods($methods)
->getMock();
}
return new Invitation(
@@ -139,7 +139,7 @@ class InvitationTest extends TestCase {
* @param array $expectedParams
*/
public function testParse($lang, $roomExists, array $params, array $expectedParams) {
- $provider = $this->getProvider(['parseInvitation', 'setSubjects', 'getUser', 'getRoom', 'getFormerRoom']);
+ $provider = $this->getProvider(['setSubjects', 'getUser', 'getRoom', 'getFormerRoom']);
/** @var IL10N|MockObject $l */
$l = $this->createMock(IL10N::class);
diff --git a/tests/php/Chat/ChatManagerTest.php b/tests/php/Chat/ChatManagerTest.php
index a8e40c05f..123d15982 100644
--- a/tests/php/Chat/ChatManagerTest.php
+++ b/tests/php/Chat/ChatManagerTest.php
@@ -109,7 +109,7 @@ class ChatManagerTest extends TestCase {
$cacheFactory,
$this->timeFactory,
])
- ->setMethods($methods)
+ ->onlyMethods($methods)
->getMock();
}
diff --git a/tests/php/Chat/Command/ExecutorTest.php b/tests/php/Chat/Command/ExecutorTest.php
index e34362271..6ca43ee35 100644
--- a/tests/php/Chat/Command/ExecutorTest.php
+++ b/tests/php/Chat/Command/ExecutorTest.php
@@ -103,7 +103,7 @@ class ExecutorTest extends TestCase {
$this->logger,
$this->l10n,
])
- ->setMethods(['createEvent'])
+ ->onlyMethods(['createEvent'])
->getMock();
$executor->expects($this->once())
->method('createEvent')
diff --git a/tests/php/Chat/Command/ShellExecutorTest.php b/tests/php/Chat/Command/ShellExecutorTest.php
index 7286c5a24..2f1920bc5 100644
--- a/tests/php/Chat/Command/ShellExecutorTest.php
+++ b/tests/php/Chat/Command/ShellExecutorTest.php
@@ -91,7 +91,7 @@ class ShellExecutorTest extends TestCase {
*/
public function testExecShell(?string $actorId, string $roomToken, string $cmd, string $arguments, string $expected, string $output): void {
$executor = $this->getMockBuilder(ShellExecutor::class)
- ->setMethods(['wrapExec'])
+ ->onlyMethods(['wrapExec'])
->getMock();
$executor->expects($this->once())
@@ -104,7 +104,7 @@ class ShellExecutorTest extends TestCase {
public function testLegacyArguments(): void {
$executor = $this->getMockBuilder(ShellExecutor::class)
- ->setMethods(['wrapExec'])
+ ->onlyMethods(['wrapExec'])
->getMock();
$executor->expects($this->never())
diff --git a/tests/php/Chat/Parser/SystemMessageTest.php b/tests/php/Chat/Parser/SystemMessageTest.php
index 581f1721e..97e77a4b7 100644
--- a/tests/php/Chat/Parser/SystemMessageTest.php
+++ b/tests/php/Chat/Parser/SystemMessageTest.php
@@ -115,7 +115,7 @@ class SystemMessageTest extends TestCase {
$this->rootFolder,
$this->url,
])
- ->setMethods($methods)
+ ->onlyMethods($methods)
->getMock();
self::invokePrivate($mock, 'l', [$this->l]);
return $mock;
diff --git a/tests/php/Command/Signaling/ListCommandTest.php b/tests/php/Command/Signaling/ListCommandTest.php
index a96ff3e26..4d7b8ad8a 100644
--- a/tests/php/Command/Signaling/ListCommandTest.php
+++ b/tests/php/Command/Signaling/ListCommandTest.php
@@ -49,7 +49,7 @@ class ListCommandTest extends TestCase {
$this->command = $this->getMockBuilder(ListCommand::class)
->setConstructorArgs([$this->config])
- ->setMethods(['writeMixedInOutputFormat'])
+ ->onlyMethods(['writeMixedInOutputFormat'])
->getMock();
$this->input = $this->createMock(InputInterface::class);
diff --git a/tests/php/Command/Stun/ListCommandTest.php b/tests/php/Command/Stun/ListCommandTest.php
index d18ec5f65..49d5fcb37 100644
--- a/tests/php/Command/Stun/ListCommandTest.php
+++ b/tests/php/Command/Stun/ListCommandTest.php
@@ -49,7 +49,7 @@ class ListCommandTest extends TestCase {
$this->command = $this->getMockBuilder(ListCommand::class)
->setConstructorArgs([$this->config])
- ->setMethods(['writeArrayInOutputFormat'])
+ ->onlyMethods(['writeArrayInOutputFormat'])
->getMock();
$this->input = $this->createMock(InputInterface::class);
diff --git a/tests/php/Command/Turn/AddTest.php b/tests/php/Command/Turn/AddTest.php
index 3401add75..ab7caa373 100644
--- a/tests/php/Command/Turn/AddTest.php
+++ b/tests/php/Command/Turn/AddTest.php
@@ -130,7 +130,7 @@ class AddTest extends TestCase {
});
$command = $this->getMockBuilder(Add::class)
- ->setMethods(['getUniqueSecret'])
+ ->onlyMethods(['getUniqueSecret'])
->setConstructorArgs([$this->config])
->getMock();
$command->expects($this->once())
diff --git a/tests/php/Command/Turn/ListCommandTest.php b/tests/php/Command/Turn/ListCommandTest.php
index e0090a73f..213b953e6 100644
--- a/tests/php/Command/Turn/ListCommandTest.php
+++ b/tests/php/Command/Turn/ListCommandTest.php
@@ -49,7 +49,7 @@ class ListCommandTest extends TestCase {
$this->command = $this->getMockBuilder(ListCommand::class)
->setConstructorArgs([$this->config])
- ->setMethods(['writeMixedInOutputFormat'])
+ ->onlyMethods(['writeMixedInOutputFormat'])
->getMock();
$this->input = $this->createMock(InputInterface::class);