From: Joas Schilling Date: Wed, 24 Jun 2020 16:11:20 +0000 (+0200) Subject: Fix tests X-Git-Tag: v20.0.0beta1~368^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F21562%2Fhead;p=nextcloud-server.git Fix tests Signed-off-by: Joas Schilling --- 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;