diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Files/Node/HookConnectorTest.php | 11 | ||||
-rw-r--r-- | tests/lib/Files/ViewTest.php | 1 |
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; |