aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2023-07-28 10:40:50 +0200
committerGitHub <noreply@github.com>2023-07-28 10:40:50 +0200
commitf3bdcfd4272f6caeac1fc5d78aa93cdca2f5d519 (patch)
treee5325372e8a493f863d1e30bd38c9bf663b613be /apps
parent67e1f5d9f74097e8e8566494e1a7771148f030d5 (diff)
parent030e8d891673d2a87878d5774df97a7d231a9738 (diff)
downloadnextcloud-server-f3bdcfd4272f6caeac1fc5d78aa93cdca2f5d519.tar.gz
nextcloud-server-f3bdcfd4272f6caeac1fc5d78aa93cdca2f5d519.zip
Merge pull request #39595 from nextcloud/bugfix/noid/remove-symfony-event-from-user
fix!: Remove symfony EventDispatcherInterface from OC\User and OC\Group
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/tests/Controller/GlobalStoragesControllerTest.php4
-rw-r--r--apps/files_external/tests/Controller/UserStoragesControllerTest.php4
-rw-r--r--apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php3
-rw-r--r--apps/user_ldap/tests/LDAPProviderTest.php2
4 files changed, 6 insertions, 7 deletions
diff --git a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php
index 0963cd06f00..5536ae80006 100644
--- a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php
+++ b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php
@@ -28,13 +28,13 @@ namespace OCA\Files_External\Tests\Controller;
use OC\User\User;
use OCA\Files_External\Controller\GlobalStoragesController;
use OCA\Files_External\Service\BackendService;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
use OCP\IGroupManager;
use OCP\IL10N;
use OCP\ILogger;
use OCP\IRequest;
use OCP\IUserSession;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class GlobalStoragesControllerTest extends StoragesControllerTest {
protected function setUp(): void {
@@ -53,7 +53,7 @@ class GlobalStoragesControllerTest extends StoragesControllerTest {
private function createController($allowCreateLocal = true) {
$session = $this->createMock(IUserSession::class);
$session->method('getUser')
- ->willReturn(new User('test', null, $this->createMock(EventDispatcherInterface::class)));
+ ->willReturn(new User('test', null, $this->createMock(IEventDispatcher::class)));
$config = $this->createMock(IConfig::class);
$config->method('getSystemValue')
diff --git a/apps/files_external/tests/Controller/UserStoragesControllerTest.php b/apps/files_external/tests/Controller/UserStoragesControllerTest.php
index f4de39fcd2b..13efbf278b6 100644
--- a/apps/files_external/tests/Controller/UserStoragesControllerTest.php
+++ b/apps/files_external/tests/Controller/UserStoragesControllerTest.php
@@ -31,13 +31,13 @@ use OCA\Files_External\Controller\UserStoragesController;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Service\BackendService;
use OCP\AppFramework\Http;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
use OCP\IGroupManager;
use OCP\IL10N;
use OCP\ILogger;
use OCP\IRequest;
use OCP\IUserSession;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class UserStoragesControllerTest extends StoragesControllerTest {
@@ -61,7 +61,7 @@ class UserStoragesControllerTest extends StoragesControllerTest {
private function createController($allowCreateLocal = true) {
$session = $this->createMock(IUserSession::class);
$session->method('getUser')
- ->willReturn(new User('test', null, $this->createMock(EventDispatcherInterface::class)));
+ ->willReturn(new User('test', null, $this->createMock(IEventDispatcher::class)));
$config = $this->createMock(IConfig::class);
$config->method('getSystemValue')
diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php
index aa5aa1df431..5e54e8acb30 100644
--- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php
+++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php
@@ -31,6 +31,7 @@ use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\StoragesService;
use OCA\Files_External\Service\UserGlobalStoragesService;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\IGroupManager;
use OCP\IUser;
use OCP\IUserSession;
@@ -66,7 +67,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest {
$this->globalStoragesService = $this->service;
- $this->user = new \OC\User\User(self::USER_ID, null, \OC::$server->getEventDispatcher());
+ $this->user = new \OC\User\User(self::USER_ID, null, \OC::$server->get(IEventDispatcher::class));
/** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject $userSession */
$userSession = $this->createMock(IUserSession::class);
$userSession
diff --git a/apps/user_ldap/tests/LDAPProviderTest.php b/apps/user_ldap/tests/LDAPProviderTest.php
index 8a071119d16..3e34ce7bdbb 100644
--- a/apps/user_ldap/tests/LDAPProviderTest.php
+++ b/apps/user_ldap/tests/LDAPProviderTest.php
@@ -39,7 +39,6 @@ use OCP\EventDispatcher\IEventDispatcher;
use OCP\ICacheFactory;
use OCP\IConfig;
use OCP\IServerContainer;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Class LDAPProviderTest
@@ -76,7 +75,6 @@ class LDAPProviderTest extends \Test\TestCase {
->setMethods(['getBackends'])
->setConstructorArgs([
$this->createMock(IConfig::class),
- $this->createMock(EventDispatcherInterface::class),
$this->createMock(ICacheFactory::class),
$this->createMock(IEventDispatcher::class),
])