diff options
Diffstat (limited to 'apps/files_external/tests')
4 files changed, 12 insertions, 4 deletions
diff --git a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php index b23c4b8f2bf..7d77ea971f3 100644 --- a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php @@ -37,7 +37,7 @@ use OCA\Files_External\Service\GlobalStoragesService; class GlobalStoragesServiceTest extends StoragesServiceTest { protected function setUp(): void { parent::setUp(); - $this->service = new GlobalStoragesService($this->backendService, $this->dbConfig, $this->mountCache); + $this->service = new GlobalStoragesService($this->backendService, $this->dbConfig, $this->mountCache, $this->eventDispatcher); } protected function tearDown(): void { diff --git a/apps/files_external/tests/Service/StoragesServiceTest.php b/apps/files_external/tests/Service/StoragesServiceTest.php index 3829a9ea0ce..4eaf70a8e84 100644 --- a/apps/files_external/tests/Service/StoragesServiceTest.php +++ b/apps/files_external/tests/Service/StoragesServiceTest.php @@ -39,6 +39,7 @@ use OCA\Files_External\Service\BackendService; use OCA\Files_External\Service\DBConfigService; use OCA\Files_External\Service\StoragesService; use OCP\AppFramework\IAppContainer; +use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Cache\ICache; use OCP\Files\Config\IUserMountCache; use OCP\Files\Mount\IMountPoint; @@ -96,6 +97,11 @@ abstract class StoragesServiceTest extends \Test\TestCase { */ protected $mountCache; + /** + * @var \PHPUnit\Framework\MockObject\MockObject|IEventDispatcher + */ + protected IEventDispatcher $eventDispatcher; + protected function setUp(): void { parent::setUp(); $this->dbConfig = new CleaningDBConfig(\OC::$server->getDatabaseConnection(), \OC::$server->getCrypto()); @@ -108,6 +114,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { \OCA\Files_External\MountConfig::$skipTest = true; $this->mountCache = $this->createMock(IUserMountCache::class); + $this->eventDispatcher = $this->createMock(IEventDispatcher::class); // prepare BackendService mock $this->backendService = diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php index ea77148c8f2..aa5aa1df431 100644 --- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php @@ -100,7 +100,8 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { $this->dbConfig, $userSession, $this->groupManager, - $this->mountCache + $this->mountCache, + $this->eventDispatcher, ); } diff --git a/apps/files_external/tests/Service/UserStoragesServiceTest.php b/apps/files_external/tests/Service/UserStoragesServiceTest.php index ff39ea9ddbc..cda1dd0a27f 100644 --- a/apps/files_external/tests/Service/UserStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserStoragesServiceTest.php @@ -54,7 +54,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { protected function setUp(): void { parent::setUp(); - $this->globalStoragesService = new GlobalStoragesService($this->backendService, $this->dbConfig, $this->mountCache); + $this->globalStoragesService = new GlobalStoragesService($this->backendService, $this->dbConfig, $this->mountCache, $this->eventDispatcher); $this->userId = $this->getUniqueID('user_'); $this->createUser($this->userId, $this->userId); @@ -67,7 +67,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { ->method('getUser') ->willReturn($this->user); - $this->service = new UserStoragesService($this->backendService, $this->dbConfig, $userSession, $this->mountCache); + $this->service = new UserStoragesService($this->backendService, $this->dbConfig, $userSession, $this->mountCache, $this->eventDispatcher); } private function makeTestStorageData() { |