diff options
author | Vitor Mattos <vitor@php.rio> | 2021-12-06 15:50:58 +0300 |
---|---|---|
committer | Vitor Mattos <vitor@php.rio> | 2021-12-06 15:50:58 +0300 |
commit | 5ac20349c6ff3c16a26bbdd1ecb3d6e9c773b9db (patch) | |
tree | 8bdc50cb83b97bbfc9ce7d5f8ee54a8c9e281c79 /tests | |
parent | 8624882113daf4483ab3dec5b28caff3b0ee672b (diff) |
Replace deprecated method
deprecated 20.0.0 use \Psr\Container\ContainerInterface::get
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/php/Activity/SettingTest.php | 16 | ||||
-rw-r--r-- | tests/php/ConfigTest.php | 2 | ||||
-rw-r--r-- | tests/php/Controller/SignalingControllerTest.php | 2 | ||||
-rw-r--r-- | tests/php/Signaling/BackendNotifierTest.php | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/tests/php/Activity/SettingTest.php b/tests/php/Activity/SettingTest.php index 730e0c5b3..04d6c35cc 100644 --- a/tests/php/Activity/SettingTest.php +++ b/tests/php/Activity/SettingTest.php @@ -37,7 +37,7 @@ class SettingTest extends TestCase { * @param string $settingClass */ public function testImplementsInterface($settingClass) { - $setting = \OC::$server->query($settingClass); + $setting = \OC::$server->get($settingClass); $this->assertInstanceOf(ISetting::class, $setting); } @@ -47,7 +47,7 @@ class SettingTest extends TestCase { */ public function testGetIdentifier($settingClass) { /** @var ISetting $setting */ - $setting = \OC::$server->query($settingClass); + $setting = \OC::$server->get($settingClass); $this->assertIsString($setting->getIdentifier()); } @@ -57,7 +57,7 @@ class SettingTest extends TestCase { */ public function testGetName($settingClass) { /** @var ISetting $setting */ - $setting = \OC::$server->query($settingClass); + $setting = \OC::$server->get($settingClass); $this->assertIsString($setting->getName()); } @@ -67,7 +67,7 @@ class SettingTest extends TestCase { */ public function testGetPriority($settingClass) { /** @var ISetting $setting */ - $setting = \OC::$server->query($settingClass); + $setting = \OC::$server->get($settingClass); $priority = $setting->getPriority(); $this->assertIsInt($setting->getPriority()); $this->assertGreaterThanOrEqual(0, $priority); @@ -80,7 +80,7 @@ class SettingTest extends TestCase { */ public function testCanChangeStream($settingClass) { /** @var ISetting $setting */ - $setting = \OC::$server->query($settingClass); + $setting = \OC::$server->get($settingClass); $this->assertIsBool($setting->canChangeStream()); } @@ -90,7 +90,7 @@ class SettingTest extends TestCase { */ public function testIsDefaultEnabledStream($settingClass) { /** @var ISetting $setting */ - $setting = \OC::$server->query($settingClass); + $setting = \OC::$server->get($settingClass); $this->assertIsBool($setting->isDefaultEnabledStream()); } @@ -100,7 +100,7 @@ class SettingTest extends TestCase { */ public function testCanChangeMail($settingClass) { /** @var ISetting $setting */ - $setting = \OC::$server->query($settingClass); + $setting = \OC::$server->get($settingClass); $this->assertIsBool($setting->canChangeMail()); } @@ -110,7 +110,7 @@ class SettingTest extends TestCase { */ public function testIsDefaultEnabledMail($settingClass) { /** @var ISetting $setting */ - $setting = \OC::$server->query($settingClass); + $setting = \OC::$server->get($settingClass); $this->assertIsBool($setting->isDefaultEnabledMail()); } } diff --git a/tests/php/ConfigTest.php b/tests/php/ConfigTest.php index 555c8e8d2..80fed760e 100644 --- a/tests/php/ConfigTest.php +++ b/tests/php/ConfigTest.php @@ -237,7 +237,7 @@ class ConfigTest extends TestCase { $secureRandom = $this->createMock(ISecureRandom::class); /** @var IEventDispatcher $dispatcher */ - $dispatcher = \OC::$server->query(IEventDispatcher::class); + $dispatcher = \OC::$server->get(IEventDispatcher::class); $servers = [ [ diff --git a/tests/php/Controller/SignalingControllerTest.php b/tests/php/Controller/SignalingControllerTest.php index b14312ce3..d7b4464c1 100644 --- a/tests/php/Controller/SignalingControllerTest.php +++ b/tests/php/Controller/SignalingControllerTest.php @@ -116,7 +116,7 @@ class SignalingControllerTest extends \Test\TestCase { ])); $config->setAppValue('spreed', 'signaling_ticket_secret', 'the-app-ticket-secret'); $config->setUserValue($this->userId, 'spreed', 'signaling_ticket_secret', 'the-user-ticket-secret'); - $this->dispatcher = \OC::$server->query(IEventDispatcher::class); + $this->dispatcher = \OC::$server->get(IEventDispatcher::class); $this->config = new Config($config, $this->secureRandom, $groupManager, $timeFactory, $this->dispatcher); $this->session = $this->createMock(TalkSession::class); $this->dbConnection = \OC::$server->getDatabaseConnection(); diff --git a/tests/php/Signaling/BackendNotifierTest.php b/tests/php/Signaling/BackendNotifierTest.php index 16d43b72e..dda899dd0 100644 --- a/tests/php/Signaling/BackendNotifierTest.php +++ b/tests/php/Signaling/BackendNotifierTest.php @@ -132,7 +132,7 @@ class BackendNotifierTest extends \Test\TestCase { ->method('getSignalingServerForConversation') ->willReturn(['server' => $this->baseUrl]); - $this->dispatcher = \OC::$server->query(IEventDispatcher::class); + $this->dispatcher = \OC::$server->get(IEventDispatcher::class); $this->config = new Config($config, $this->secureRandom, $groupManager, $this->timeFactory, $this->dispatcher); $this->recreateBackendNotifier(); |