summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/Activity/Filter.php4
-rw-r--r--apps/files_sharing/lib/Activity/Providers/Downloads.php8
-rw-r--r--apps/files_sharing/lib/Activity/Providers/Groups.php10
-rw-r--r--apps/files_sharing/lib/Activity/Providers/PublicLinks.php12
-rw-r--r--apps/files_sharing/lib/Activity/Providers/RemoteShares.php8
-rw-r--r--apps/files_sharing/lib/Activity/Providers/Users.php20
-rw-r--r--apps/files_sharing/lib/AppInfo/Application.php2
-rw-r--r--apps/files_sharing/lib/External/Manager.php2
-rw-r--r--apps/files_sharing/lib/External/MountProvider.php2
-rw-r--r--apps/files_sharing/lib/ShareBackend/File.php14
-rw-r--r--apps/files_sharing/lib/Updater.php6
-rw-r--r--apps/files_sharing/tests/ApiTest.php54
-rw-r--r--apps/files_sharing/tests/CacheTest.php12
-rw-r--r--apps/files_sharing/tests/ExternalStorageTest.php2
-rw-r--r--apps/files_sharing/tests/PermissionsTest.php4
-rw-r--r--apps/files_sharing/tests/ShareTest.php2
-rw-r--r--apps/files_sharing/tests/TestCase.php10
-rw-r--r--apps/files_sharing/tests/UnshareChildrenTest.php2
-rw-r--r--apps/files_sharing/tests/UpdaterTest.php2
-rw-r--r--apps/files_sharing/tests/WatcherTest.php6
20 files changed, 91 insertions, 91 deletions
diff --git a/apps/files_sharing/lib/Activity/Filter.php b/apps/files_sharing/lib/Activity/Filter.php
index 4df53745c7b..4997482bddb 100644
--- a/apps/files_sharing/lib/Activity/Filter.php
+++ b/apps/files_sharing/lib/Activity/Filter.php
@@ -28,8 +28,8 @@ use OCP\IL10N;
use OCP\IURLGenerator;
class Filter implements IFilter {
- const TYPE_REMOTE_SHARE = 'remote_share';
- const TYPE_SHARED = 'shared';
+ public const TYPE_REMOTE_SHARE = 'remote_share';
+ public const TYPE_SHARED = 'shared';
/** @var IL10N */
protected $l;
diff --git a/apps/files_sharing/lib/Activity/Providers/Downloads.php b/apps/files_sharing/lib/Activity/Providers/Downloads.php
index 23c55e08a26..acb4ce3837a 100644
--- a/apps/files_sharing/lib/Activity/Providers/Downloads.php
+++ b/apps/files_sharing/lib/Activity/Providers/Downloads.php
@@ -26,11 +26,11 @@ namespace OCA\Files_Sharing\Activity\Providers;
use OCP\Activity\IEvent;
class Downloads extends Base {
- const SUBJECT_PUBLIC_SHARED_FILE_DOWNLOADED = 'public_shared_file_downloaded';
- const SUBJECT_PUBLIC_SHARED_FOLDER_DOWNLOADED = 'public_shared_folder_downloaded';
+ public const SUBJECT_PUBLIC_SHARED_FILE_DOWNLOADED = 'public_shared_file_downloaded';
+ public const SUBJECT_PUBLIC_SHARED_FOLDER_DOWNLOADED = 'public_shared_folder_downloaded';
- const SUBJECT_SHARED_FILE_BY_EMAIL_DOWNLOADED = 'file_shared_with_email_downloaded';
- const SUBJECT_SHARED_FOLDER_BY_EMAIL_DOWNLOADED = 'folder_shared_with_email_downloaded';
+ public const SUBJECT_SHARED_FILE_BY_EMAIL_DOWNLOADED = 'file_shared_with_email_downloaded';
+ public const SUBJECT_SHARED_FOLDER_BY_EMAIL_DOWNLOADED = 'folder_shared_with_email_downloaded';
/**
* @param IEvent $event
diff --git a/apps/files_sharing/lib/Activity/Providers/Groups.php b/apps/files_sharing/lib/Activity/Providers/Groups.php
index c6115a8dba0..dfc3e6b521d 100644
--- a/apps/files_sharing/lib/Activity/Providers/Groups.php
+++ b/apps/files_sharing/lib/Activity/Providers/Groups.php
@@ -35,13 +35,13 @@ use OCP\IUserManager;
use OCP\L10N\IFactory;
class Groups extends Base {
- const SUBJECT_SHARED_GROUP_SELF = 'shared_group_self';
- const SUBJECT_RESHARED_GROUP_BY = 'reshared_group_by';
+ public const SUBJECT_SHARED_GROUP_SELF = 'shared_group_self';
+ public const SUBJECT_RESHARED_GROUP_BY = 'reshared_group_by';
- const SUBJECT_UNSHARED_GROUP_SELF = 'unshared_group_self';
- const SUBJECT_UNSHARED_GROUP_BY = 'unshared_group_by';
+ public const SUBJECT_UNSHARED_GROUP_SELF = 'unshared_group_self';
+ public const SUBJECT_UNSHARED_GROUP_BY = 'unshared_group_by';
- const SUBJECT_EXPIRED_GROUP = 'expired_group';
+ public const SUBJECT_EXPIRED_GROUP = 'expired_group';
/** @var IGroupManager */
protected $groupManager;
diff --git a/apps/files_sharing/lib/Activity/Providers/PublicLinks.php b/apps/files_sharing/lib/Activity/Providers/PublicLinks.php
index 0ebe6cdec0f..884296e46f5 100644
--- a/apps/files_sharing/lib/Activity/Providers/PublicLinks.php
+++ b/apps/files_sharing/lib/Activity/Providers/PublicLinks.php
@@ -26,12 +26,12 @@ namespace OCA\Files_Sharing\Activity\Providers;
use OCP\Activity\IEvent;
class PublicLinks extends Base {
- const SUBJECT_SHARED_LINK_SELF = 'shared_link_self';
- const SUBJECT_RESHARED_LINK_BY = 'reshared_link_by';
- const SUBJECT_UNSHARED_LINK_SELF = 'unshared_link_self';
- const SUBJECT_UNSHARED_LINK_BY = 'unshared_link_by';
- const SUBJECT_LINK_EXPIRED = 'link_expired';
- const SUBJECT_LINK_BY_EXPIRED = 'link_by_expired';
+ public const SUBJECT_SHARED_LINK_SELF = 'shared_link_self';
+ public const SUBJECT_RESHARED_LINK_BY = 'reshared_link_by';
+ public const SUBJECT_UNSHARED_LINK_SELF = 'unshared_link_self';
+ public const SUBJECT_UNSHARED_LINK_BY = 'unshared_link_by';
+ public const SUBJECT_LINK_EXPIRED = 'link_expired';
+ public const SUBJECT_LINK_BY_EXPIRED = 'link_by_expired';
/**
* @param IEvent $event
diff --git a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
index 2604288d448..4a297fcf060 100644
--- a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
+++ b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
@@ -33,10 +33,10 @@ use OCP\IUserManager;
use OCP\L10N\IFactory;
class RemoteShares extends Base {
- const SUBJECT_REMOTE_SHARE_ACCEPTED = 'remote_share_accepted';
- const SUBJECT_REMOTE_SHARE_DECLINED = 'remote_share_declined';
- const SUBJECT_REMOTE_SHARE_RECEIVED = 'remote_share_received';
- const SUBJECT_REMOTE_SHARE_UNSHARED = 'remote_share_unshared';
+ public const SUBJECT_REMOTE_SHARE_ACCEPTED = 'remote_share_accepted';
+ public const SUBJECT_REMOTE_SHARE_DECLINED = 'remote_share_declined';
+ public const SUBJECT_REMOTE_SHARE_RECEIVED = 'remote_share_received';
+ public const SUBJECT_REMOTE_SHARE_UNSHARED = 'remote_share_unshared';
public function __construct(IFactory $languageFactory,
IURLGenerator $url,
diff --git a/apps/files_sharing/lib/Activity/Providers/Users.php b/apps/files_sharing/lib/Activity/Providers/Users.php
index aff5feddc01..8f90ffdf567 100644
--- a/apps/files_sharing/lib/Activity/Providers/Users.php
+++ b/apps/files_sharing/lib/Activity/Providers/Users.php
@@ -28,18 +28,18 @@ namespace OCA\Files_Sharing\Activity\Providers;
use OCP\Activity\IEvent;
class Users extends Base {
- const SUBJECT_SHARED_USER_SELF = 'shared_user_self';
- const SUBJECT_RESHARED_USER_BY = 'reshared_user_by';
- const SUBJECT_UNSHARED_USER_SELF = 'unshared_user_self';
- const SUBJECT_UNSHARED_USER_BY = 'unshared_user_by';
+ public const SUBJECT_SHARED_USER_SELF = 'shared_user_self';
+ public const SUBJECT_RESHARED_USER_BY = 'reshared_user_by';
+ public const SUBJECT_UNSHARED_USER_SELF = 'unshared_user_self';
+ public const SUBJECT_UNSHARED_USER_BY = 'unshared_user_by';
- const SUBJECT_SHARED_WITH_BY = 'shared_with_by';
- const SUBJECT_UNSHARED_BY = 'unshared_by';
- const SUBJECT_SELF_UNSHARED = 'self_unshared';
- const SUBJECT_SELF_UNSHARED_BY = 'self_unshared_by';
+ public const SUBJECT_SHARED_WITH_BY = 'shared_with_by';
+ public const SUBJECT_UNSHARED_BY = 'unshared_by';
+ public const SUBJECT_SELF_UNSHARED = 'self_unshared';
+ public const SUBJECT_SELF_UNSHARED_BY = 'self_unshared_by';
- const SUBJECT_EXPIRED_USER = 'expired_user';
- const SUBJECT_EXPIRED = 'expired';
+ public const SUBJECT_EXPIRED_USER = 'expired_user';
+ public const SUBJECT_EXPIRED = 'expired';
/**
* @param IEvent $event
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php
index 2902b820af3..34db7441daa 100644
--- a/apps/files_sharing/lib/AppInfo/Application.php
+++ b/apps/files_sharing/lib/AppInfo/Application.php
@@ -65,7 +65,7 @@ use OCP\Util;
use Symfony\Component\EventDispatcher\GenericEvent;
class Application extends App {
- const APP_ID = 'files_sharing';
+ public const APP_ID = 'files_sharing';
public function __construct(array $urlParams = []) {
parent::__construct(self::APP_ID, $urlParams);
diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php
index 3923fdf09d3..8331787c6df 100644
--- a/apps/files_sharing/lib/External/Manager.php
+++ b/apps/files_sharing/lib/External/Manager.php
@@ -48,7 +48,7 @@ use OCP\Share;
use OCP\Share\IShare;
class Manager {
- const STORAGE = '\OCA\Files_Sharing\External\Storage';
+ public const STORAGE = '\OCA\Files_Sharing\External\Storage';
/**
* @var string
diff --git a/apps/files_sharing/lib/External/MountProvider.php b/apps/files_sharing/lib/External/MountProvider.php
index 992aba48c66..5d26bf20b47 100644
--- a/apps/files_sharing/lib/External/MountProvider.php
+++ b/apps/files_sharing/lib/External/MountProvider.php
@@ -30,7 +30,7 @@ use OCP\IDBConnection;
use OCP\IUser;
class MountProvider implements IMountProvider {
- const STORAGE = '\OCA\Files_Sharing\External\Storage';
+ public const STORAGE = '\OCA\Files_Sharing\External\Storage';
/**
* @var \OCP\IDBConnection
diff --git a/apps/files_sharing/lib/ShareBackend/File.php b/apps/files_sharing/lib/ShareBackend/File.php
index 2db6c374c85..a15391162ff 100644
--- a/apps/files_sharing/lib/ShareBackend/File.php
+++ b/apps/files_sharing/lib/ShareBackend/File.php
@@ -37,13 +37,13 @@ namespace OCA\Files_Sharing\ShareBackend;
use OCA\FederatedFileSharing\FederatedShareProvider;
class File implements \OCP\Share_Backend_File_Dependent {
- const FORMAT_SHARED_STORAGE = 0;
- const FORMAT_GET_FOLDER_CONTENTS = 1;
- const FORMAT_FILE_APP_ROOT = 2;
- const FORMAT_OPENDIR = 3;
- const FORMAT_GET_ALL = 4;
- const FORMAT_PERMISSIONS = 5;
- const FORMAT_TARGET_NAMES = 6;
+ public const FORMAT_SHARED_STORAGE = 0;
+ public const FORMAT_GET_FOLDER_CONTENTS = 1;
+ public const FORMAT_FILE_APP_ROOT = 2;
+ public const FORMAT_OPENDIR = 3;
+ public const FORMAT_GET_ALL = 4;
+ public const FORMAT_PERMISSIONS = 5;
+ public const FORMAT_TARGET_NAMES = 6;
private $path;
diff --git a/apps/files_sharing/lib/Updater.php b/apps/files_sharing/lib/Updater.php
index 828453be765..1e290e28f77 100644
--- a/apps/files_sharing/lib/Updater.php
+++ b/apps/files_sharing/lib/Updater.php
@@ -31,7 +31,7 @@ class Updater {
/**
* @param array $params
*/
- static public function renameHook($params) {
+ public static function renameHook($params) {
self::renameChildren($params['oldpath'], $params['newpath']);
self::moveShareToShare($params['newpath']);
}
@@ -46,7 +46,7 @@ class Updater {
*
* @param string $path
*/
- static private function moveShareToShare($path) {
+ private static function moveShareToShare($path) {
$userFolder = \OC::$server->getUserFolder();
// If the user folder can't be constructed (e.g. link share) just return.
@@ -90,7 +90,7 @@ class Updater {
* @param string $oldPath old path relative to data/user/files
* @param string $newPath new path relative to data/user/files
*/
- static private function renameChildren($oldPath, $newPath) {
+ private static function renameChildren($oldPath, $newPath) {
$absNewPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $newPath);
$absOldPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $oldPath);
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php
index 2d262a0104a..6bbb62d6090 100644
--- a/apps/files_sharing/tests/ApiTest.php
+++ b/apps/files_sharing/tests/ApiTest.php
@@ -53,8 +53,8 @@ use OCP\Share\IShare;
* TODO: convert to real intergration tests
*/
class ApiTest extends TestCase {
- const TEST_FOLDER_NAME = '/folder_share_api_test';
- const APP_NAME = 'files_sharing';
+ public const TEST_FOLDER_NAME = '/folder_share_api_test';
+ public const APP_NAME = 'files_sharing';
private static $tempStorage;
@@ -130,7 +130,7 @@ class ApiTest extends TestCase {
);
}
- function testCreateShareUserFile() {
+ public function testCreateShareUserFile() {
$this->setUp(); // for some reasons phpunit refuses to do this for us only for this test
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
$result = $ocs->createShare($this->filename, \OCP\Constants::PERMISSION_ALL, \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2);
@@ -148,7 +148,7 @@ class ApiTest extends TestCase {
$ocs->cleanup();
}
- function testCreateShareUserFolder() {
+ public function testCreateShareUserFolder() {
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
$result = $ocs->createShare($this->folder, \OCP\Constants::PERMISSION_ALL, \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2);
$ocs->cleanup();
@@ -165,7 +165,7 @@ class ApiTest extends TestCase {
}
- function testCreateShareGroupFile() {
+ public function testCreateShareGroupFile() {
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
$result = $ocs->createShare($this->filename, \OCP\Constants::PERMISSION_ALL, \OCP\Share::SHARE_TYPE_GROUP, self::TEST_FILES_SHARING_API_GROUP1);
$ocs->cleanup();
@@ -181,7 +181,7 @@ class ApiTest extends TestCase {
$ocs->cleanup();
}
- function testCreateShareGroupFolder() {
+ public function testCreateShareGroupFolder() {
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
$result = $ocs->createShare($this->folder, \OCP\Constants::PERMISSION_ALL, \OCP\Share::SHARE_TYPE_GROUP, self::TEST_FILES_SHARING_API_GROUP1);
$ocs->cleanup();
@@ -245,7 +245,7 @@ class ApiTest extends TestCase {
$ocs->cleanup();
}
- function testEnforceLinkPassword() {
+ public function testEnforceLinkPassword() {
$password = md5(time());
$config = \OC::$server->getConfig();
$config->setAppValue('core', 'shareapi_enforce_links_password', 'yes');
@@ -299,7 +299,7 @@ class ApiTest extends TestCase {
/**
* @medium
*/
- function testSharePermissions() {
+ public function testSharePermissions() {
// sharing file to a user should work if shareapi_exclude_groups is set
// to no
\OC::$server->getConfig()->setAppValue('core', 'shareapi_exclude_groups', 'no');
@@ -350,7 +350,7 @@ class ApiTest extends TestCase {
/**
* @medium
*/
- function testGetAllShares() {
+ public function testGetAllShares() {
$node = $this->userFolder->get($this->filename);
$share = $this->shareManager->newShare();
@@ -371,7 +371,7 @@ class ApiTest extends TestCase {
$this->shareManager->deleteShare($share);
}
- function testGetAllSharesWithMe() {
+ public function testGetAllSharesWithMe() {
$node1 = $this->userFolder->get($this->filename);
$share1 = $this->shareManager->newShare();
$share1->setNode($node1)
@@ -407,7 +407,7 @@ class ApiTest extends TestCase {
/**
* @medium
*/
- function testPublicLinkUrl() {
+ public function testPublicLinkUrl() {
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
$result = $ocs->createShare($this->folder, \OCP\Constants::PERMISSION_ALL, \OCP\Share::SHARE_TYPE_LINK);
$ocs->cleanup();
@@ -456,7 +456,7 @@ class ApiTest extends TestCase {
* @depends testCreateShareUserFile
* @depends testCreateShareLink
*/
- function testGetShareFromSource() {
+ public function testGetShareFromSource() {
$node = $this->userFolder->get($this->filename);
$share = $this->shareManager->newShare();
$share->setNode($node)
@@ -489,7 +489,7 @@ class ApiTest extends TestCase {
* @depends testCreateShareUserFile
* @depends testCreateShareLink
*/
- function testGetShareFromSourceWithReshares() {
+ public function testGetShareFromSourceWithReshares() {
$node = $this->userFolder->get($this->filename);
$share1 = $this->shareManager->newShare();
$share1->setNode($node)
@@ -530,7 +530,7 @@ class ApiTest extends TestCase {
* @medium
* @depends testCreateShareUserFile
*/
- function testGetShareFromId() {
+ public function testGetShareFromId() {
$node = $this->userFolder->get($this->filename);
$share1 = $this->shareManager->newShare();
$share1->setNode($node)
@@ -554,7 +554,7 @@ class ApiTest extends TestCase {
/**
* @medium
*/
- function testGetShareFromFolder() {
+ public function testGetShareFromFolder() {
$node1 = $this->userFolder->get($this->filename);
$share1 = $this->shareManager->newShare();
$share1->setNode($node1)
@@ -584,7 +584,7 @@ class ApiTest extends TestCase {
$this->shareManager->deleteShare($share2);
}
- function testGetShareFromFolderWithFile() {
+ public function testGetShareFromFolderWithFile() {
$node1 = $this->userFolder->get($this->filename);
$share1 = $this->shareManager->newShare();
$share1->setNode($node1)
@@ -610,7 +610,7 @@ class ApiTest extends TestCase {
* share a folder, than reshare a file within the shared folder and check if we construct the correct path
* @medium
*/
- function testGetShareFromFolderReshares() {
+ public function testGetShareFromFolderReshares() {
$node1 = $this->userFolder->get($this->folder);
$share1 = $this->shareManager->newShare();
$share1->setNode($node1)
@@ -670,7 +670,7 @@ class ApiTest extends TestCase {
* reshare a sub folder and check if we get the correct path
* @medium
*/
- function testGetShareFromSubFolderReShares() {
+ public function testGetShareFromSubFolderReShares() {
$node1 = $this->userFolder->get($this->folder . $this->subfolder);
$share1 = $this->shareManager->newShare();
$share1->setNode($node1)
@@ -712,7 +712,7 @@ class ApiTest extends TestCase {
* test re-re-share of folder if the path gets constructed correctly
* @medium
*/
- function XtestGetShareFromFolderReReShares() {
+ public function XtestGetShareFromFolderReReShares() {
$node1 = $this->userFolder->get($this->folder . $this->subfolder);
$share1 = $this->shareManager->newShare();
$share1->setNode($node1)
@@ -789,7 +789,7 @@ class ApiTest extends TestCase {
* test multiple shared folder if the path gets constructed correctly
* @medium
*/
- function testGetShareMultipleSharedFolder() {
+ public function testGetShareMultipleSharedFolder() {
$this->setUp();
$node1 = $this->userFolder->get($this->folder . $this->subfolder);
$share1 = $this->shareManager->newShare();
@@ -854,7 +854,7 @@ class ApiTest extends TestCase {
* test re-re-share of folder if the path gets constructed correctly
* @medium
*/
- function testGetShareFromFileReReShares() {
+ public function testGetShareFromFileReReShares() {
$node1 = $this->userFolder->get($this->folder . $this->subfolder);
$share1 = $this->shareManager->newShare();
$share1->setNode($node1)
@@ -909,7 +909,7 @@ class ApiTest extends TestCase {
/**
* @medium
*/
- function testGetShareFromUnknownId() {
+ public function testGetShareFromUnknownId() {
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER3);
try {
$ocs->getShare(0);
@@ -925,7 +925,7 @@ class ApiTest extends TestCase {
* @depends testCreateShareUserFile
* @depends testCreateShareLink
*/
- function testUpdateShare() {
+ public function testUpdateShare() {
$password = md5(time());
$node1 = $this->userFolder->get($this->filename);
@@ -976,7 +976,7 @@ class ApiTest extends TestCase {
/**
* @medium
*/
- function testUpdateShareUpload() {
+ public function testUpdateShareUpload() {
$node1 = $this->userFolder->get($this->folder);
$share1 = $this->shareManager->newShare();
$share1->setNode($node1)
@@ -1006,7 +1006,7 @@ class ApiTest extends TestCase {
/**
* @medium
*/
- function testUpdateShareExpireDate() {
+ public function testUpdateShareExpireDate() {
$node1 = $this->userFolder->get($this->folder);
$share1 = $this->shareManager->newShare();
$share1->setNode($node1)
@@ -1078,7 +1078,7 @@ class ApiTest extends TestCase {
* @medium
* @depends testCreateShareUserFile
*/
- function testDeleteShare() {
+ public function testDeleteShare() {
$node1 = $this->userFolder->get($this->filename);
$share1 = $this->shareManager->newShare();
$share1->setNode($node1)
@@ -1110,7 +1110,7 @@ class ApiTest extends TestCase {
/**
* test unshare of a reshared file
*/
- function testDeleteReshare() {
+ public function testDeleteReshare() {
$node1 = $this->userFolder->get($this->folder);
$share1 = $this->shareManager->newShare();
$share1->setNode($node1)
diff --git a/apps/files_sharing/tests/CacheTest.php b/apps/files_sharing/tests/CacheTest.php
index 355a1a8bb1b..09fc9f6f5a7 100644
--- a/apps/files_sharing/tests/CacheTest.php
+++ b/apps/files_sharing/tests/CacheTest.php
@@ -147,7 +147,7 @@ class CacheTest extends TestCase {
parent::tearDown();
}
- function searchDataProvider() {
+ public function searchDataProvider() {
return [
['%another%',
[
@@ -211,7 +211,7 @@ class CacheTest extends TestCase {
* we cannot use a dataProvider because that would cause the stray hook detection to remove the hooks
* that were added in setUpBeforeClass.
*/
- function testSearch() {
+ public function testSearch() {
foreach ($this->searchDataProvider() as $data) {
list($pattern, $expectedFiles) = $data;
@@ -223,7 +223,7 @@ class CacheTest extends TestCase {
/**
* Test searching by mime type
*/
- function testSearchByMime() {
+ public function testSearchByMime() {
$results = $this->sharedStorage->getCache()->searchByMime('text');
$check = [
[
@@ -242,7 +242,7 @@ class CacheTest extends TestCase {
$this->verifyFiles($check, $results);
}
- function testGetFolderContentsInRoot() {
+ public function testGetFolderContentsInRoot() {
$results = $this->user2View->getDirectoryContent('/');
// we should get the shared items "shareddir" and "shared single file.txt"
@@ -274,7 +274,7 @@ class CacheTest extends TestCase {
);
}
- function testGetFolderContentsInSubdir() {
+ public function testGetFolderContentsInSubdir() {
$results = $this->user2View->getDirectoryContent('/shareddir');
$this->verifyFiles(
@@ -305,7 +305,7 @@ class CacheTest extends TestCase {
);
}
- function testGetFolderContentsWhenSubSubdirShared() {
+ public function testGetFolderContentsWhenSubSubdirShared() {
self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
$rootFolder = \OC::$server->getUserFolder(self::TEST_FILES_SHARING_API_USER1);
diff --git a/apps/files_sharing/tests/ExternalStorageTest.php b/apps/files_sharing/tests/ExternalStorageTest.php
index fa8df930a4e..b8c1db6c9da 100644
--- a/apps/files_sharing/tests/ExternalStorageTest.php
+++ b/apps/files_sharing/tests/ExternalStorageTest.php
@@ -39,7 +39,7 @@ use OCP\Http\Client\IResponse;
* @group DB
*/
class ExternalStorageTest extends \Test\TestCase {
- function optionsProvider() {
+ public function optionsProvider() {
return [
[
'http://remoteserver:8080/owncloud',
diff --git a/apps/files_sharing/tests/PermissionsTest.php b/apps/files_sharing/tests/PermissionsTest.php
index edbaf2f555a..4d21b3e0eb7 100644
--- a/apps/files_sharing/tests/PermissionsTest.php
+++ b/apps/files_sharing/tests/PermissionsTest.php
@@ -137,7 +137,7 @@ class PermissionsTest extends TestCase {
/**
* Test that the permissions of shared directory are returned correctly
*/
- function testGetPermissions() {
+ public function testGetPermissions() {
$sharedDirPerms = $this->sharedStorage->getPermissions('');
$this->assertEquals(31, $sharedDirPerms);
$sharedDirPerms = $this->sharedStorage->getPermissions('textfile.txt');
@@ -151,7 +151,7 @@ class PermissionsTest extends TestCase {
/**
* Test that the permissions of shared directory are returned correctly
*/
- function testGetDirectoryPermissions() {
+ public function testGetDirectoryPermissions() {
$contents = $this->secondView->getDirectoryContent('files/shareddir');
$this->assertEquals('subdir', $contents[0]['name']);
$this->assertEquals(31, $contents[0]['permissions']);
diff --git a/apps/files_sharing/tests/ShareTest.php b/apps/files_sharing/tests/ShareTest.php
index 313c8d8ac56..ba6b401e65e 100644
--- a/apps/files_sharing/tests/ShareTest.php
+++ b/apps/files_sharing/tests/ShareTest.php
@@ -34,7 +34,7 @@ namespace OCA\Files_Sharing\Tests;
* @group DB
*/
class ShareTest extends TestCase {
- const TEST_FOLDER_NAME = '/folder_share_api_test';
+ public const TEST_FOLDER_NAME = '/folder_share_api_test';
private static $tempStorage;
diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php
index 323fc06f321..f84867c0aca 100644
--- a/apps/files_sharing/tests/TestCase.php
+++ b/apps/files_sharing/tests/TestCase.php
@@ -47,12 +47,12 @@ use Test\Traits\MountProviderTrait;
abstract class TestCase extends \Test\TestCase {
use MountProviderTrait;
- const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
- const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
- const TEST_FILES_SHARING_API_USER3 = "test-share-user3";
- const TEST_FILES_SHARING_API_USER4 = "test-share-user4";
+ public const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
+ public const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
+ public const TEST_FILES_SHARING_API_USER3 = "test-share-user3";
+ public const TEST_FILES_SHARING_API_USER4 = "test-share-user4";
- const TEST_FILES_SHARING_API_GROUP1 = "test-share-group1";
+ public const TEST_FILES_SHARING_API_GROUP1 = "test-share-group1";
public $filename;
public $data;
diff --git a/apps/files_sharing/tests/UnshareChildrenTest.php b/apps/files_sharing/tests/UnshareChildrenTest.php
index 56fdeb44a30..15daf9d5108 100644
--- a/apps/files_sharing/tests/UnshareChildrenTest.php
+++ b/apps/files_sharing/tests/UnshareChildrenTest.php
@@ -37,7 +37,7 @@ namespace OCA\Files_Sharing\Tests;
class UnshareChildrenTest extends TestCase {
protected $subsubfolder;
- const TEST_FOLDER_NAME = '/folder_share_api_test';
+ public const TEST_FOLDER_NAME = '/folder_share_api_test';
private static $tempStorage;
diff --git a/apps/files_sharing/tests/UpdaterTest.php b/apps/files_sharing/tests/UpdaterTest.php
index 0abc76df433..f2227721edc 100644
--- a/apps/files_sharing/tests/UpdaterTest.php
+++ b/apps/files_sharing/tests/UpdaterTest.php
@@ -36,7 +36,7 @@ namespace OCA\Files_Sharing\Tests;
* @group DB
*/
class UpdaterTest extends TestCase {
- const TEST_FOLDER_NAME = '/folder_share_updater_test';
+ public const TEST_FOLDER_NAME = '/folder_share_updater_test';
public static function setUpBeforeClass(): void {
parent::setUpBeforeClass();
diff --git a/apps/files_sharing/tests/WatcherTest.php b/apps/files_sharing/tests/WatcherTest.php
index e483b2e1d92..e105bf16161 100644
--- a/apps/files_sharing/tests/WatcherTest.php
+++ b/apps/files_sharing/tests/WatcherTest.php
@@ -111,7 +111,7 @@ class WatcherTest extends TestCase {
* Tests that writing a file using the shared storage will propagate the file
* size to the owner's parent folders.
*/
- function testFolderSizePropagationToOwnerStorage() {
+ public function testFolderSizePropagationToOwnerStorage() {
$initialSizes = self::getOwnerDirSizes('files/container/shareddir');
$textData = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@@ -141,7 +141,7 @@ class WatcherTest extends TestCase {
* Tests that writing a file using the shared storage will propagate the file
* size to the owner's parent folders.
*/
- function testSubFolderSizePropagationToOwnerStorage() {
+ public function testSubFolderSizePropagationToOwnerStorage() {
$initialSizes = self::getOwnerDirSizes('files/container/shareddir/subdir');
$textData = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@@ -173,7 +173,7 @@ class WatcherTest extends TestCase {
* where the key is the path and the value is the size.
* @param string $path
*/
- function getOwnerDirSizes($path) {
+ public function getOwnerDirSizes($path) {
$result = [];
while ($path != '' && $path != '' && $path != '.') {