aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-05-28 19:46:36 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-06-25 10:02:27 +0200
commit3174012adf3fde4de74efa12cfa7e480b874b295 (patch)
treebc58b99dc45b5adcdeaf30269e9a6eab2c853773 /apps/files_trashbin
parent817bdc47c804ae8511ad3423eae216f6ccdee6c6 (diff)
downloadnextcloud-server-3174012adf3fde4de74efa12cfa7e480b874b295.tar.gz
nextcloud-server-3174012adf3fde4de74efa12cfa7e480b874b295.zip
Add event dispatcher to OCP
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r--apps/files_trashbin/lib/Storage.php8
-rw-r--r--apps/files_trashbin/tests/StorageTest.php5
2 files changed, 6 insertions, 7 deletions
diff --git a/apps/files_trashbin/lib/Storage.php b/apps/files_trashbin/lib/Storage.php
index 0db634eeb9e..04105dda6ce 100644
--- a/apps/files_trashbin/lib/Storage.php
+++ b/apps/files_trashbin/lib/Storage.php
@@ -38,7 +38,7 @@ use OCP\Files\Mount\IMountPoint;
use OCP\Files\Node;
use OCP\ILogger;
use OCP\IUserManager;
-use Symfony\Component\EventDispatcher\EventDispatcher;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class Storage extends Wrapper {
/** @var IMountPoint */
@@ -50,7 +50,7 @@ class Storage extends Wrapper {
/** @var ILogger */
private $logger;
- /** @var EventDispatcher */
+ /** @var EventDispatcherInterface */
private $eventDispatcher;
/** @var IRootFolder */
@@ -66,7 +66,7 @@ class Storage extends Wrapper {
* @param ITrashManager $trashManager
* @param IUserManager|null $userManager
* @param ILogger|null $logger
- * @param EventDispatcher|null $eventDispatcher
+ * @param EventDispatcherInterface|null $eventDispatcher
* @param IRootFolder|null $rootFolder
*/
public function __construct(
@@ -74,7 +74,7 @@ class Storage extends Wrapper {
ITrashManager $trashManager = null,
IUserManager $userManager = null,
ILogger $logger = null,
- EventDispatcher $eventDispatcher = null,
+ EventDispatcherInterface $eventDispatcher = null,
IRootFolder $rootFolder = null
) {
$this->mountPoint = $parameters['mountPoint'];
diff --git a/apps/files_trashbin/tests/StorageTest.php b/apps/files_trashbin/tests/StorageTest.php
index 058d64d1aa0..eff33f9b30c 100644
--- a/apps/files_trashbin/tests/StorageTest.php
+++ b/apps/files_trashbin/tests/StorageTest.php
@@ -40,7 +40,7 @@ use OCP\Files\IRootFolder;
use OCP\Files\Node;
use OCP\ILogger;
use OCP\IUserManager;
-use Symfony\Component\EventDispatcher\EventDispatcher;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Class Storage
@@ -543,8 +543,7 @@ class StorageTest extends \Test\TestCase {
$userManager->expects($this->any())
->method('userExists')->willReturn($userExists);
$logger = $this->getMockBuilder(ILogger::class)->getMock();
- $eventDispatcher = $this->getMockBuilder(EventDispatcher::class)
- ->disableOriginalConstructor()->getMock();
+ $eventDispatcher = $this->createMock(EventDispatcherInterface::class);
$rootFolder = $this->createMock(IRootFolder::class);
$node = $this->getMockBuilder(Node::class)->disableOriginalConstructor()->getMock();
$trashManager = $this->createMock(ITrashManager::class);