diff options
author | Andrew Summers <18727110+summersab@users.noreply.github.com> | 2023-08-29 17:30:52 -0500 |
---|---|---|
committer | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-03-15 13:14:06 +0100 |
commit | 69108321700f0cd9c471f4e1ce25ed993873f33b (patch) | |
tree | aeab6882be6d569daa92803e74ca8b69d6b8c31c /tests | |
parent | df1cd1ba7e6e1f6e66a2b3229b5c082f1b81162e (diff) | |
download | nextcloud-server-69108321700f0cd9c471f4e1ce25ed993873f33b.tar.gz nextcloud-server-69108321700f0cd9c471f4e1ce25ed993873f33b.zip |
Refactor `OC\Server::getCommentsManager`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Comments/ManagerTest.php | 2 | ||||
-rw-r--r-- | tests/lib/ServerTest.php | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/lib/Comments/ManagerTest.php b/tests/lib/Comments/ManagerTest.php index 9dcc24d12a1..69276b122b9 100644 --- a/tests/lib/Comments/ManagerTest.php +++ b/tests/lib/Comments/ManagerTest.php @@ -668,7 +668,7 @@ class ManagerTest extends TestCase { $user = \OC::$server->getUserManager()->createUser('xenia', '123456'); $this->assertTrue($user instanceof IUser); - $manager = \OC::$server->getCommentsManager(); + $manager = \OC::$server->get(ICommentsManager::class); $comment = $manager->create('users', $user->getUID(), 'files', 'file64'); $comment ->setMessage('Most important comment I ever left on the Internet.') diff --git a/tests/lib/ServerTest.php b/tests/lib/ServerTest.php index d9f95e9eab1..90f47eba231 100644 --- a/tests/lib/ServerTest.php +++ b/tests/lib/ServerTest.php @@ -26,6 +26,7 @@ namespace Test; use OC\App\AppStore\Fetcher\AppFetcher; use OC\App\AppStore\Fetcher\CategoryFetcher; +use OCP\Comments\ICommentsManager; /** * Class Server @@ -185,7 +186,7 @@ class ServerTest extends \Test\TestCase { $config->setSystemValue('comments.managerFactory', '\Test\Comments\FakeFactory'); - $manager = $this->server->getCommentsManager(); + $manager = $this->server->get(ICommentsManager::class); $this->assertInstanceOf('\OCP\Comments\ICommentsManager', $manager); $config->setSystemValue('comments.managerFactory', $defaultManagerFactory); |