aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-07-25 11:40:42 +0200
committerJoas Schilling <coding@schilljs.com>2023-07-27 09:57:51 +0200
commit5bb6a7804f051111606be094f6ee183db0e3d2c7 (patch)
treec3b733aa1aeacf9bac566caf3dea6d93f1a79bdb /tests
parent4f7de8ed60f528c38af9e4ba988015e9e9abc5dc (diff)
downloadnextcloud-server-5bb6a7804f051111606be094f6ee183db0e3d2c7.tar.gz
nextcloud-server-5bb6a7804f051111606be094f6ee183db0e3d2c7.zip
fix: Move AppManager events to IEventDispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/App/AppManagerTest.php16
-rw-r--r--tests/lib/AppTest.php1
2 files changed, 5 insertions, 12 deletions
diff --git a/tests/lib/App/AppManagerTest.php b/tests/lib/App/AppManagerTest.php
index d597b216041..4717da008a4 100644
--- a/tests/lib/App/AppManagerTest.php
+++ b/tests/lib/App/AppManagerTest.php
@@ -27,7 +27,6 @@ use OCP\IUser;
use OCP\IUserSession;
use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Test\TestCase;
/**
@@ -93,9 +92,6 @@ class AppManagerTest extends TestCase {
/** @var ICacheFactory|MockObject */
protected $cacheFactory;
- /** @var EventDispatcherInterface|MockObject */
- protected $legacyEventDispatcher;
-
/** @var IEventDispatcher|MockObject */
protected $eventDispatcher;
@@ -114,7 +110,6 @@ class AppManagerTest extends TestCase {
$this->appConfig = $this->getAppConfig();
$this->cacheFactory = $this->createMock(ICacheFactory::class);
$this->cache = $this->createMock(ICache::class);
- $this->legacyEventDispatcher = $this->createMock(EventDispatcherInterface::class);
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
$this->logger = $this->createMock(LoggerInterface::class);
$this->cacheFactory->expects($this->any())
@@ -127,7 +122,6 @@ class AppManagerTest extends TestCase {
$this->appConfig,
$this->groupManager,
$this->cacheFactory,
- $this->legacyEventDispatcher,
$this->eventDispatcher,
$this->logger
);
@@ -176,7 +170,7 @@ class AppManagerTest extends TestCase {
/** @var AppManager|MockObject $manager */
$manager = $this->getMockBuilder(AppManager::class)
->setConstructorArgs([
- $this->userSession, $this->config, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->legacyEventDispatcher, $this->eventDispatcher, $this->logger
+ $this->userSession, $this->config, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher, $this->logger
])
->setMethods([
'getAppPath',
@@ -224,7 +218,7 @@ class AppManagerTest extends TestCase {
/** @var AppManager|MockObject $manager */
$manager = $this->getMockBuilder(AppManager::class)
->setConstructorArgs([
- $this->userSession, $this->config, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->legacyEventDispatcher, $this->eventDispatcher, $this->logger
+ $this->userSession, $this->config, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher, $this->logger
])
->setMethods([
'getAppPath',
@@ -280,7 +274,7 @@ class AppManagerTest extends TestCase {
/** @var AppManager|MockObject $manager */
$manager = $this->getMockBuilder(AppManager::class)
->setConstructorArgs([
- $this->userSession, $this->config, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->legacyEventDispatcher, $this->eventDispatcher, $this->logger
+ $this->userSession, $this->config, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher, $this->logger
])
->setMethods([
'getAppPath',
@@ -476,7 +470,7 @@ class AppManagerTest extends TestCase {
public function testGetAppsNeedingUpgrade() {
/** @var AppManager|MockObject $manager */
$manager = $this->getMockBuilder(AppManager::class)
- ->setConstructorArgs([$this->userSession, $this->config, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->legacyEventDispatcher, $this->eventDispatcher, $this->logger])
+ ->setConstructorArgs([$this->userSession, $this->config, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher, $this->logger])
->setMethods(['getAppInfo'])
->getMock();
@@ -527,7 +521,7 @@ class AppManagerTest extends TestCase {
public function testGetIncompatibleApps() {
/** @var AppManager|MockObject $manager */
$manager = $this->getMockBuilder(AppManager::class)
- ->setConstructorArgs([$this->userSession, $this->config, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->legacyEventDispatcher, $this->eventDispatcher, $this->logger])
+ ->setConstructorArgs([$this->userSession, $this->config, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher, $this->logger])
->setMethods(['getAppInfo'])
->getMock();
diff --git a/tests/lib/AppTest.php b/tests/lib/AppTest.php
index 5cdee5e1200..12fbdb011d9 100644
--- a/tests/lib/AppTest.php
+++ b/tests/lib/AppTest.php
@@ -560,7 +560,6 @@ class AppTest extends \Test\TestCase {
$appConfig,
\OC::$server->getGroupManager(),
\OC::$server->getMemCacheFactory(),
- \OC::$server->getEventDispatcher(),
\OC::$server->get(IEventDispatcher::class),
\OC::$server->get(LoggerInterface::class)
));