summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2019-11-06 12:06:44 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2019-11-26 14:48:59 +0100
commitfc16b09a2c437908246869b0f6dc3b13cd47ce82 (patch)
treed88bf9b91bad17d77427d935d299bf6cdce8e479 /tests
parent1b8cbf115af9e3f0b0997dff2b303d8fae7ca3e9 (diff)
downloadnextcloud-server-fc16b09a2c437908246869b0f6dc3b13cd47ce82.tar.gz
nextcloud-server-fc16b09a2c437908246869b0f6dc3b13cd47ce82.zip
Files first to use own GenericEvent
* those are added to 18 only anyway :) Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Files/Node/HookConnectorTest.php11
-rw-r--r--tests/lib/Files/ViewTest.php1
2 files changed, 8 insertions, 4 deletions
diff --git a/tests/lib/Files/Node/HookConnectorTest.php b/tests/lib/Files/Node/HookConnectorTest.php
index 0d67fada3c0..5180dbb9fe2 100644
--- a/tests/lib/Files/Node/HookConnectorTest.php
+++ b/tests/lib/Files/Node/HookConnectorTest.php
@@ -13,6 +13,8 @@ use OC\Files\Node\HookConnector;
use OC\Files\Node\Root;
use OC\Files\Storage\Temporary;
use OC\Files\View;
+use OCP\EventDispatcher\Event;
+use OCP\EventDispatcher\GenericEvent as APIGenericEvent;
use OCP\Files\Node;
use OCP\ILogger;
use OCP\IUserManager;
@@ -146,7 +148,8 @@ class HookConnectorTest extends TestCase {
$dispatcherCalled = false;
/** @var Node $dispatcherNode */
$dispatcherNode = null;
- $this->eventDispatcher->addListener($expectedEvent, function (GenericEvent $event) use (&$dispatcherCalled, &$dispatcherNode) {
+ $this->eventDispatcher->addListener($expectedEvent, function ($event) use (&$dispatcherCalled, &$dispatcherNode) {
+ /** @var GenericEvent|APIGenericEvent $event */
$dispatcherCalled = true;
$dispatcherNode = $event->getSubject();
});
@@ -206,7 +209,8 @@ class HookConnectorTest extends TestCase {
$dispatcherSourceNode = null;
/** @var Node $dispatcherTargetNode */
$dispatcherTargetNode = null;
- $this->eventDispatcher->addListener($expectedEvent, function (GenericEvent $event) use (&$dispatcherSourceNode, &$dispatcherTargetNode, &$dispatcherCalled) {
+ $this->eventDispatcher->addListener($expectedEvent, function ($event) use (&$dispatcherSourceNode, &$dispatcherTargetNode, &$dispatcherCalled) {
+ /** @var GenericEvent|APIGenericEvent $event */
$dispatcherCalled = true;
list($dispatcherSourceNode, $dispatcherTargetNode) = $event->getSubject();
});
@@ -237,7 +241,8 @@ class HookConnectorTest extends TestCase {
$dispatcherCalled = false;
/** @var Node $dispatcherNode */
$dispatcherNode = null;
- $this->eventDispatcher->addListener('\OCP\Files::postDelete', function (GenericEvent $event) use (&$dispatcherCalled, &$dispatcherNode) {
+ $this->eventDispatcher->addListener('\OCP\Files::postDelete', function ($event) use (&$dispatcherCalled, &$dispatcherNode) {
+ /** @var GenericEvent|APIGenericEvent $event */
$dispatcherCalled = true;
$dispatcherNode = $event->getSubject();
});
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php
index 43a3a06ba0b..c154c28e24a 100644
--- a/tests/lib/Files/ViewTest.php
+++ b/tests/lib/Files/ViewTest.php
@@ -15,7 +15,6 @@ use OC\Files\Storage\Common;
use OC\Files\Storage\Temporary;
use OC\Files\Stream\Quota;
use OC\Files\View;
-use OCP\Constants;
use OCP\Files\Config\IMountProvider;
use OCP\Files\FileInfo;
use OCP\Files\Storage\IStorage;