From a2f34f46b28fe2d072e23768fe8df60c6041d025 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 24 Jun 2020 18:11:20 +0200 Subject: [PATCH] Fix tests Signed-off-by: Joas Schilling --- apps/dav/tests/unit/Files/FileSearchBackendTest.php | 5 ++--- .../tests/Controller/ShareesAPIControllerTest.php | 2 +- apps/files_versions/tests/VersioningTest.php | 1 + lib/private/Collaboration/Collaborators/UserPlugin.php | 1 - tests/lib/Files/Node/HookConnectorTest.php | 1 - 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/dav/tests/unit/Files/FileSearchBackendTest.php b/apps/dav/tests/unit/Files/FileSearchBackendTest.php index a5841da2c66..733de9ea1e9 100644 --- a/apps/dav/tests/unit/Files/FileSearchBackendTest.php +++ b/apps/dav/tests/unit/Files/FileSearchBackendTest.php @@ -44,7 +44,6 @@ use OCP\Share\IManager; use SearchDAV\Backend\SearchPropertyDefinition; use SearchDAV\Query\Limit; use SearchDAV\Query\Query; -use SearchDAV\XML\Operator; use Test\TestCase; class FileSearchBackendTest extends TestCase { @@ -258,7 +257,7 @@ class FileSearchBackendTest extends TestCase { $this->assertEquals('/files/test/test/path', $result[0]->href); } - + public function testSearchInvalidProp() { $this->expectException(\InvalidArgumentException::class); @@ -295,7 +294,7 @@ class FileSearchBackendTest extends TestCase { return new Query($select, $from, $where, $orderBy, $limit); } - + public function testSearchNonFolder() { $this->expectException(\InvalidArgumentException::class); diff --git a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php index 8939198d4a8..d3fb914f404 100644 --- a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php @@ -293,7 +293,7 @@ class ShareesAPIControllerTest extends TestCase { $this->shareManager->expects($this->any()) ->method('shareProviderExists') ->willReturnCallback(function ($shareType) use ($emailSharingEnabled) { - if ($shareType === \OCP\IShare::TYPE_EMAIL) { + if ($shareType === IShare::TYPE_EMAIL) { return $emailSharingEnabled; } else { return false; diff --git a/apps/files_versions/tests/VersioningTest.php b/apps/files_versions/tests/VersioningTest.php index ffbf4e19f98..b146e51c407 100644 --- a/apps/files_versions/tests/VersioningTest.php +++ b/apps/files_versions/tests/VersioningTest.php @@ -40,6 +40,7 @@ require_once __DIR__ . '/../appinfo/app.php'; use OC\Files\Storage\Temporary; use OCP\IConfig; use OCP\IUser; +use OCP\Share\IShare; /** * Class Test_Files_versions diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php index c5600fce070..d1f29350734 100644 --- a/lib/private/Collaboration/Collaborators/UserPlugin.php +++ b/lib/private/Collaboration/Collaborators/UserPlugin.php @@ -37,7 +37,6 @@ use OCP\IGroupManager; use OCP\IUser; use OCP\IUserManager; use OCP\IUserSession; -use OCP\Share; use OCP\Share\IShare; class UserPlugin implements ISearchPlugin { diff --git a/tests/lib/Files/Node/HookConnectorTest.php b/tests/lib/Files/Node/HookConnectorTest.php index 004b74e755c..a5e73f18365 100644 --- a/tests/lib/Files/Node/HookConnectorTest.php +++ b/tests/lib/Files/Node/HookConnectorTest.php @@ -13,7 +13,6 @@ 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\EventDispatcher\IEventDispatcher; use OCP\Files\Events\Node\AbstractNodeEvent; -- 2.39.5