diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-05-25 15:40:05 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-05-25 15:40:05 +0200 |
commit | d22aeb749d22590c4caf630fd390dabca6e2c724 (patch) | |
tree | 34ee255a19177a99504b4b5f652b071dc268cf3b /apps | |
parent | 7f20203006d1a8ac1ba4d367044b9a0613a3fb59 (diff) | |
parent | 3f0b2d148d875a2a4961a5b27309d379b9de1329 (diff) | |
download | nextcloud-server-d22aeb749d22590c4caf630fd390dabca6e2c724.tar.gz nextcloud-server-d22aeb749d22590c4caf630fd390dabca6e2c724.zip |
Merge pull request #24661 from owncloud/files_sharing-psr4
Move Files_Sharing to PSR-4
Diffstat (limited to 'apps')
-rw-r--r-- | apps/federatedfilesharing/lib/Notifier.php (renamed from apps/federatedfilesharing/lib/notifier.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/appinfo/app.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/appinfo/info.xml | 6 | ||||
-rw-r--r-- | apps/files_sharing/appinfo/routes.php | 3 | ||||
-rw-r--r-- | apps/files_sharing/lib/API/OCSShareWrapper.php (renamed from apps/files_sharing/api/ocssharewrapper.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/API/Remote.php (renamed from apps/files_sharing/api/remote.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/API/Share20OCS.php (renamed from apps/files_sharing/api/share20ocs.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/API/Sharees.php (renamed from apps/files_sharing/api/sharees.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/Activity.php (renamed from apps/files_sharing/lib/activity.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/AppInfo/Application.php (renamed from apps/files_sharing/appinfo/application.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/Cache.php (renamed from apps/files_sharing/lib/cache.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/Capabilities.php (renamed from apps/files_sharing/lib/capabilities.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/Controllers/ExternalSharesController.php (renamed from apps/files_sharing/lib/controllers/externalsharescontroller.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/Controllers/ShareController.php (renamed from apps/files_sharing/lib/controllers/sharecontroller.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/DeleteOrphanedSharesJob.php (renamed from apps/files_sharing/lib/deleteorphanedsharesjob.php) | 2 | ||||
-rw-r--r-- | apps/files_sharing/lib/Exceptions/BrokenPath.php (renamed from apps/files_sharing/lib/exceptions/brokenpath.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/Exceptions/S2SException.php (renamed from apps/files_sharing/lib/exceptions/s2sexception.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/ExpireSharesJob.php (renamed from apps/files_sharing/lib/expiresharesjob.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/External/Cache.php (renamed from apps/files_sharing/lib/external/cache.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/External/Manager.php (renamed from apps/files_sharing/lib/external/manager.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/External/Mount.php (renamed from apps/files_sharing/lib/external/mount.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/External/MountProvider.php (renamed from apps/files_sharing/lib/external/mountprovider.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/External/Scanner.php (renamed from apps/files_sharing/lib/external/scanner.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/External/Storage.php (renamed from apps/files_sharing/lib/external/storage.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/Helper.php (renamed from apps/files_sharing/lib/helper.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/Hooks.php (renamed from apps/files_sharing/lib/hooks.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/ISharedStorage.php (renamed from apps/files_sharing/lib/isharedstorage.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/Maintainer.php (renamed from apps/files_sharing/lib/maintainer.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php (renamed from apps/files_sharing/lib/middleware/sharingcheckmiddleware.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/Migration.php (renamed from apps/files_sharing/lib/migration.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/MountProvider.php (renamed from apps/files_sharing/lib/mountprovider.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/Scanner.php (renamed from apps/files_sharing/lib/scanner.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/SharedMount.php (renamed from apps/files_sharing/lib/sharedmount.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/SharedPropagator.php (renamed from apps/files_sharing/lib/sharedpropagator.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/lib/Updater.php (renamed from apps/files_sharing/lib/updater.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/tests/API/Share20OCSTest.php (renamed from apps/files_sharing/tests/api/share20ocstest.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/tests/API/ShareesTest.php (renamed from apps/files_sharing/tests/api/shareestest.php) | 2 | ||||
-rw-r--r-- | apps/files_sharing/tests/ActivityTest.php (renamed from apps/files_sharing/tests/activity.php) | 8 | ||||
-rw-r--r-- | apps/files_sharing/tests/ApiTest.php (renamed from apps/files_sharing/tests/api.php) | 63 | ||||
-rw-r--r-- | apps/files_sharing/tests/BackendTest.php (renamed from apps/files_sharing/tests/backend.php) | 8 | ||||
-rw-r--r-- | apps/files_sharing/tests/CacheTest.php (renamed from apps/files_sharing/tests/cache.php) | 8 | ||||
-rw-r--r-- | apps/files_sharing/tests/CapabilitiesTest.php (renamed from apps/files_sharing/tests/capabilities.php) | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/Controllers/ExternalShareControllerTest.php (renamed from apps/files_sharing/tests/controller/externalsharecontroller.php) | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/Controllers/ShareControllerTest.php (renamed from apps/files_sharing/tests/controller/sharecontroller.php) | 5 | ||||
-rw-r--r-- | apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php (renamed from apps/files_sharing/tests/deleteorphanedsharesjobtest.php) | 6 | ||||
-rw-r--r-- | apps/files_sharing/tests/EncryptedSizePropagationTest.php (renamed from apps/files_sharing/tests/encryptedsizepropagation.php) | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/EtagPropagationTest.php (renamed from apps/files_sharing/tests/etagpropagation.php) | 8 | ||||
-rw-r--r-- | apps/files_sharing/tests/ExpireSharesJobTest.php (renamed from apps/files_sharing/tests/expiresharesjobtest.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/tests/External/CacheTest.php (renamed from apps/files_sharing/tests/external/cache.php) | 8 | ||||
-rw-r--r-- | apps/files_sharing/tests/External/ManagerTest.php (renamed from apps/files_sharing/tests/external/managertest.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/tests/External/ScannerTest.php (renamed from apps/files_sharing/tests/external/scannertest.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/tests/ExternalStorageTest.php (renamed from apps/files_sharing/tests/externalstorage.php) | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/GroupEtagPropagationTest.php (renamed from apps/files_sharing/tests/groupetagpropagation.php) | 6 | ||||
-rw-r--r-- | apps/files_sharing/tests/HelperTest.php (renamed from apps/files_sharing/tests/helper.php) | 7 | ||||
-rw-r--r-- | apps/files_sharing/tests/LockingTest.php (renamed from apps/files_sharing/tests/locking.php) | 8 | ||||
-rw-r--r-- | apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php (renamed from apps/files_sharing/tests/middleware/sharingcheckmiddleware.php) | 0 | ||||
-rw-r--r-- | apps/files_sharing/tests/MigrationTest.php (renamed from apps/files_sharing/tests/migrationtest.php) | 3 | ||||
-rw-r--r-- | apps/files_sharing/tests/PermissionsTest.php (renamed from apps/files_sharing/tests/permissions.php) | 8 | ||||
-rw-r--r-- | apps/files_sharing/tests/PropagationTestCase.php (renamed from apps/files_sharing/tests/propagationtestcase.php) | 2 | ||||
-rw-r--r-- | apps/files_sharing/tests/ShareTest.php (renamed from apps/files_sharing/tests/share.php) | 12 | ||||
-rw-r--r-- | apps/files_sharing/tests/SharedMountTest.php (renamed from apps/files_sharing/tests/sharedmount.php) | 6 | ||||
-rw-r--r-- | apps/files_sharing/tests/SharedStorageTest.php (renamed from apps/files_sharing/tests/sharedstorage.php) | 6 | ||||
-rw-r--r-- | apps/files_sharing/tests/SizePropagationTest.php (renamed from apps/files_sharing/tests/sizepropagation.php) | 8 | ||||
-rw-r--r-- | apps/files_sharing/tests/TestCase.php (renamed from apps/files_sharing/tests/testcase.php) | 5 | ||||
-rw-r--r-- | apps/files_sharing/tests/UnshareChildrenTest.php (renamed from apps/files_sharing/tests/unsharechildren.php) | 10 | ||||
-rw-r--r-- | apps/files_sharing/tests/UpdaterTest.php (renamed from apps/files_sharing/tests/updater.php) | 5 | ||||
-rw-r--r-- | apps/files_sharing/tests/WatcherTest.php (renamed from apps/files_sharing/tests/watcher.php) | 6 |
67 files changed, 126 insertions, 113 deletions
diff --git a/apps/federatedfilesharing/lib/notifier.php b/apps/federatedfilesharing/lib/Notifier.php index 1c8d92c7eca..1c8d92c7eca 100644 --- a/apps/federatedfilesharing/lib/notifier.php +++ b/apps/federatedfilesharing/lib/Notifier.php diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php index 32eee9b6c9c..e96269d1148 100644 --- a/apps/files_sharing/appinfo/app.php +++ b/apps/files_sharing/appinfo/app.php @@ -26,15 +26,13 @@ * */ -namespace OCA\Files_Sharing\Appinfo; - $l = \OC::$server->getL10N('files_sharing'); \OC::$CLASSPATH['OC_Share_Backend_File'] = 'files_sharing/lib/share/file.php'; \OC::$CLASSPATH['OC_Share_Backend_Folder'] = 'files_sharing/lib/share/folder.php'; \OC::$CLASSPATH['OC\Files\Storage\Shared'] = 'files_sharing/lib/sharedstorage.php'; -$application = new Application(); +$application = new \OCA\Files_Sharing\AppInfo\Application(); $application->registerMountProviders(); \OCA\Files_Sharing\Helper::registerHooks(); diff --git a/apps/files_sharing/appinfo/info.xml b/apps/files_sharing/appinfo/info.xml index 7e49e267275..c1f98aa94ac 100644 --- a/apps/files_sharing/appinfo/info.xml +++ b/apps/files_sharing/appinfo/info.xml @@ -21,8 +21,10 @@ Turning the feature off removes shared files and folders on the server for all s <files>public.php</files> </public> + <namespace>Files_Sharing</namespace> + <background-jobs> - <job>OCA\Files_sharing\Lib\DeleteOrphanedSharesJob</job> - <job>OCA\Files_sharing\ExpireSharesJob</job> + <job>OCA\Files_Sharing\DeleteOrphanedSharesJob</job> + <job>OCA\Files_Sharing\ExpireSharesJob</job> </background-jobs> </info> diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php index 80632f0fedf..2e11e0e62bc 100644 --- a/apps/files_sharing/appinfo/routes.php +++ b/apps/files_sharing/appinfo/routes.php @@ -24,11 +24,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ -namespace OCA\Files_Sharing\AppInfo; use OCP\API; -$application = new Application(); +$application = new \OCA\Files_Sharing\AppInfo\Application(); $application->registerRoutes($this, [ 'resources' => [ 'ExternalShares' => ['url' => '/api/externalShares'], diff --git a/apps/files_sharing/api/ocssharewrapper.php b/apps/files_sharing/lib/API/OCSShareWrapper.php index 8ce9271a709..8ce9271a709 100644 --- a/apps/files_sharing/api/ocssharewrapper.php +++ b/apps/files_sharing/lib/API/OCSShareWrapper.php diff --git a/apps/files_sharing/api/remote.php b/apps/files_sharing/lib/API/Remote.php index 1b5eb28aa86..1b5eb28aa86 100644 --- a/apps/files_sharing/api/remote.php +++ b/apps/files_sharing/lib/API/Remote.php diff --git a/apps/files_sharing/api/share20ocs.php b/apps/files_sharing/lib/API/Share20OCS.php index 28166b943b8..28166b943b8 100644 --- a/apps/files_sharing/api/share20ocs.php +++ b/apps/files_sharing/lib/API/Share20OCS.php diff --git a/apps/files_sharing/api/sharees.php b/apps/files_sharing/lib/API/Sharees.php index 4e005c5e26c..4e005c5e26c 100644 --- a/apps/files_sharing/api/sharees.php +++ b/apps/files_sharing/lib/API/Sharees.php diff --git a/apps/files_sharing/lib/activity.php b/apps/files_sharing/lib/Activity.php index 721379eb78f..721379eb78f 100644 --- a/apps/files_sharing/lib/activity.php +++ b/apps/files_sharing/lib/Activity.php diff --git a/apps/files_sharing/appinfo/application.php b/apps/files_sharing/lib/AppInfo/Application.php index b17e213e2e2..b17e213e2e2 100644 --- a/apps/files_sharing/appinfo/application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/Cache.php index abd75282579..abd75282579 100644 --- a/apps/files_sharing/lib/cache.php +++ b/apps/files_sharing/lib/Cache.php diff --git a/apps/files_sharing/lib/capabilities.php b/apps/files_sharing/lib/Capabilities.php index 5ec540ad4e0..5ec540ad4e0 100644 --- a/apps/files_sharing/lib/capabilities.php +++ b/apps/files_sharing/lib/Capabilities.php diff --git a/apps/files_sharing/lib/controllers/externalsharescontroller.php b/apps/files_sharing/lib/Controllers/ExternalSharesController.php index beefb4d7027..beefb4d7027 100644 --- a/apps/files_sharing/lib/controllers/externalsharescontroller.php +++ b/apps/files_sharing/lib/Controllers/ExternalSharesController.php diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/Controllers/ShareController.php index 04912d20afc..04912d20afc 100644 --- a/apps/files_sharing/lib/controllers/sharecontroller.php +++ b/apps/files_sharing/lib/Controllers/ShareController.php diff --git a/apps/files_sharing/lib/deleteorphanedsharesjob.php b/apps/files_sharing/lib/DeleteOrphanedSharesJob.php index 72bf6b222e7..2678d46661d 100644 --- a/apps/files_sharing/lib/deleteorphanedsharesjob.php +++ b/apps/files_sharing/lib/DeleteOrphanedSharesJob.php @@ -20,7 +20,7 @@ * */ -namespace OCA\Files_sharing\Lib; +namespace OCA\Files_Sharing; use OC\BackgroundJob\TimedJob; diff --git a/apps/files_sharing/lib/exceptions/brokenpath.php b/apps/files_sharing/lib/Exceptions/BrokenPath.php index 4639d47c4a6..4639d47c4a6 100644 --- a/apps/files_sharing/lib/exceptions/brokenpath.php +++ b/apps/files_sharing/lib/Exceptions/BrokenPath.php diff --git a/apps/files_sharing/lib/exceptions/s2sexception.php b/apps/files_sharing/lib/Exceptions/S2SException.php index 1ed6a9e2179..1ed6a9e2179 100644 --- a/apps/files_sharing/lib/exceptions/s2sexception.php +++ b/apps/files_sharing/lib/Exceptions/S2SException.php diff --git a/apps/files_sharing/lib/expiresharesjob.php b/apps/files_sharing/lib/ExpireSharesJob.php index 479f407e68f..479f407e68f 100644 --- a/apps/files_sharing/lib/expiresharesjob.php +++ b/apps/files_sharing/lib/ExpireSharesJob.php diff --git a/apps/files_sharing/lib/external/cache.php b/apps/files_sharing/lib/External/Cache.php index da9bf83cdfa..da9bf83cdfa 100644 --- a/apps/files_sharing/lib/external/cache.php +++ b/apps/files_sharing/lib/External/Cache.php diff --git a/apps/files_sharing/lib/external/manager.php b/apps/files_sharing/lib/External/Manager.php index 5b7a13f1eb1..5b7a13f1eb1 100644 --- a/apps/files_sharing/lib/external/manager.php +++ b/apps/files_sharing/lib/External/Manager.php diff --git a/apps/files_sharing/lib/external/mount.php b/apps/files_sharing/lib/External/Mount.php index 9cf66d3f8f0..9cf66d3f8f0 100644 --- a/apps/files_sharing/lib/external/mount.php +++ b/apps/files_sharing/lib/External/Mount.php diff --git a/apps/files_sharing/lib/external/mountprovider.php b/apps/files_sharing/lib/External/MountProvider.php index 67d85f27d81..67d85f27d81 100644 --- a/apps/files_sharing/lib/external/mountprovider.php +++ b/apps/files_sharing/lib/External/MountProvider.php diff --git a/apps/files_sharing/lib/external/scanner.php b/apps/files_sharing/lib/External/Scanner.php index 1cc6cf8f5f9..1cc6cf8f5f9 100644 --- a/apps/files_sharing/lib/external/scanner.php +++ b/apps/files_sharing/lib/External/Scanner.php diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/External/Storage.php index 4382dcab0c3..4382dcab0c3 100644 --- a/apps/files_sharing/lib/external/storage.php +++ b/apps/files_sharing/lib/External/Storage.php diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/Helper.php index 500d82cb2d2..500d82cb2d2 100644 --- a/apps/files_sharing/lib/helper.php +++ b/apps/files_sharing/lib/Helper.php diff --git a/apps/files_sharing/lib/hooks.php b/apps/files_sharing/lib/Hooks.php index 4882ffcb001..4882ffcb001 100644 --- a/apps/files_sharing/lib/hooks.php +++ b/apps/files_sharing/lib/Hooks.php diff --git a/apps/files_sharing/lib/isharedstorage.php b/apps/files_sharing/lib/ISharedStorage.php index bb47b011f48..bb47b011f48 100644 --- a/apps/files_sharing/lib/isharedstorage.php +++ b/apps/files_sharing/lib/ISharedStorage.php diff --git a/apps/files_sharing/lib/maintainer.php b/apps/files_sharing/lib/Maintainer.php index 1d06a34bd0c..1d06a34bd0c 100644 --- a/apps/files_sharing/lib/maintainer.php +++ b/apps/files_sharing/lib/Maintainer.php diff --git a/apps/files_sharing/lib/middleware/sharingcheckmiddleware.php b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php index a4a968b37fa..a4a968b37fa 100644 --- a/apps/files_sharing/lib/middleware/sharingcheckmiddleware.php +++ b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php diff --git a/apps/files_sharing/lib/migration.php b/apps/files_sharing/lib/Migration.php index 766a7ebd52a..766a7ebd52a 100644 --- a/apps/files_sharing/lib/migration.php +++ b/apps/files_sharing/lib/Migration.php diff --git a/apps/files_sharing/lib/mountprovider.php b/apps/files_sharing/lib/MountProvider.php index 8e133951293..8e133951293 100644 --- a/apps/files_sharing/lib/mountprovider.php +++ b/apps/files_sharing/lib/MountProvider.php diff --git a/apps/files_sharing/lib/scanner.php b/apps/files_sharing/lib/Scanner.php index 215c0a7b6ae..215c0a7b6ae 100644 --- a/apps/files_sharing/lib/scanner.php +++ b/apps/files_sharing/lib/Scanner.php diff --git a/apps/files_sharing/lib/sharedmount.php b/apps/files_sharing/lib/SharedMount.php index 4aed80b12b2..4aed80b12b2 100644 --- a/apps/files_sharing/lib/sharedmount.php +++ b/apps/files_sharing/lib/SharedMount.php diff --git a/apps/files_sharing/lib/sharedpropagator.php b/apps/files_sharing/lib/SharedPropagator.php index f17cfc3a75b..f17cfc3a75b 100644 --- a/apps/files_sharing/lib/sharedpropagator.php +++ b/apps/files_sharing/lib/SharedPropagator.php diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/Updater.php index 02c349e94b6..02c349e94b6 100644 --- a/apps/files_sharing/lib/updater.php +++ b/apps/files_sharing/lib/Updater.php diff --git a/apps/files_sharing/tests/api/share20ocstest.php b/apps/files_sharing/tests/API/Share20OCSTest.php index 96ce34f963c..96ce34f963c 100644 --- a/apps/files_sharing/tests/api/share20ocstest.php +++ b/apps/files_sharing/tests/API/Share20OCSTest.php diff --git a/apps/files_sharing/tests/api/shareestest.php b/apps/files_sharing/tests/API/ShareesTest.php index cda41f55183..8a88e7126ee 100644 --- a/apps/files_sharing/tests/api/shareestest.php +++ b/apps/files_sharing/tests/API/ShareesTest.php @@ -25,7 +25,7 @@ namespace OCA\Files_Sharing\Tests\API; use OCA\Files_Sharing\API\Sharees; -use OCA\Files_sharing\Tests\TestCase; +use OCA\Files_Sharing\Tests\TestCase; use OCP\AppFramework\Http; use OCP\Share; diff --git a/apps/files_sharing/tests/activity.php b/apps/files_sharing/tests/ActivityTest.php index 40a1031f779..2894d485aca 100644 --- a/apps/files_sharing/tests/activity.php +++ b/apps/files_sharing/tests/ActivityTest.php @@ -22,16 +22,16 @@ * */ -namespace OCA\Files_sharing\Tests; +namespace OCA\Files_Sharing\Tests; /** - * Class Activity + * Class ActivityTest * * @group DB * - * @package OCA\Files_sharing\Tests + * @package OCA\Files_Sharing\Tests */ -class Activity extends \OCA\Files_Sharing\Tests\TestCase { +class ActivityTest extends TestCase { /** * @var \OCA\Files_Sharing\Activity diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/ApiTest.php index 3ded1bfc5d4..3a2d42a646f 100644 --- a/apps/files_sharing/tests/api.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -26,15 +26,14 @@ * */ -use OCA\Files\Share; -use OCA\Files_sharing\Tests\TestCase; +namespace OCA\Files_Sharing\Tests; /** - * Class Test_Files_Sharing_Api + * Class ApiTest * * @group DB */ -class Test_Files_Sharing_Api extends TestCase { +class ApiTest extends TestCase { const TEST_FOLDER_NAME = '/folder_share_api_test'; @@ -125,7 +124,7 @@ class Test_Files_Sharing_Api extends TestCase { function testCreateShareUserFile() { // simulate a post request $data['path'] = $this->filename; - $data['shareWith'] = \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2; + $data['shareWith'] = self::TEST_FILES_SHARING_API_USER2; $data['shareType'] = \OCP\Share::SHARE_TYPE_USER; $request = $this->createRequest($data); @@ -148,7 +147,7 @@ class Test_Files_Sharing_Api extends TestCase { function testCreateShareUserFolder() { // simulate a post request $data['path'] = $this->folder; - $data['shareWith'] = \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2; + $data['shareWith'] = self::TEST_FILES_SHARING_API_USER2; $data['shareType'] = \OCP\Share::SHARE_TYPE_USER; $request = $this->createRequest($data); @@ -172,7 +171,7 @@ class Test_Files_Sharing_Api extends TestCase { function testCreateShareGroupFile() { // simulate a post request $data['path'] = $this->filename; - $data['shareWith'] = \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_GROUP1; + $data['shareWith'] = self::TEST_FILES_SHARING_API_GROUP1; $data['shareType'] = \OCP\Share::SHARE_TYPE_GROUP; $request = $this->createRequest($data); @@ -195,7 +194,7 @@ class Test_Files_Sharing_Api extends TestCase { function testCreateShareGroupFolder() { // simulate a post request $data['path'] = $this->folder; - $data['shareWith'] = \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_GROUP1; + $data['shareWith'] = self::TEST_FILES_SHARING_API_GROUP1; $data['shareType'] = \OCP\Share::SHARE_TYPE_GROUP; $request = $this->createRequest($data); @@ -347,7 +346,7 @@ class Test_Files_Sharing_Api extends TestCase { // to no \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups', 'no'); $post['path'] = $this->filename; - $post['shareWith'] = \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2; + $post['shareWith'] = self::TEST_FILES_SHARING_API_USER2; $post['shareType'] = \OCP\Share::SHARE_TYPE_USER; $request = $this->createRequest($post); @@ -370,7 +369,7 @@ class Test_Files_Sharing_Api extends TestCase { $post = []; $post['path'] = $this->filename; - $post['shareWith'] = \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2; + $post['shareWith'] = self::TEST_FILES_SHARING_API_USER2; $post['shareType'] = \OCP\Share::SHARE_TYPE_USER; $request = $this->createRequest($post); @@ -392,7 +391,7 @@ class Test_Files_Sharing_Api extends TestCase { $post = []; $post['path'] = $this->filename; - $post['shareWith'] = \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2; + $post['shareWith'] = self::TEST_FILES_SHARING_API_USER2; $post['shareType'] = \OCP\Share::SHARE_TYPE_USER; $request = $this->createRequest($post); @@ -1194,7 +1193,7 @@ class Test_Files_Sharing_Api extends TestCase { */ public function testShareFolderWithAMountPoint() { // user 1 shares a folder with user2 - \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1); + self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $fileInfo = $this->view->getFileInfo($this->folder); @@ -1207,9 +1206,9 @@ class Test_Files_Sharing_Api extends TestCase { ); // user2 shares a file from the folder as link - \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2); + self::loginHelper(self::TEST_FILES_SHARING_API_USER2); - $view = new \OC\Files\View('/' . \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2 . '/files'); + $view = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER2 . '/files'); $view->mkdir("localDir"); // move mount point to the folder "localDir" @@ -1242,7 +1241,7 @@ class Test_Files_Sharing_Api extends TestCase { $this->assertTrue($result !== false); $view->unlink('localDir'); - \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1); + self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $this->shareManager->deleteShare($share); } @@ -1251,8 +1250,8 @@ class Test_Files_Sharing_Api extends TestCase { * Post init mount points hook for mounting simulated ext storage */ public static function initTestMountPointsHook($data) { - if ($data['user'] === \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1) { - \OC\Files\Filesystem::mount(self::$tempStorage, array(), '/' . \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1 . '/files' . self::TEST_FOLDER_NAME); + if ($data['user'] === self::TEST_FILES_SHARING_API_USER1) { + \OC\Files\Filesystem::mount(self::$tempStorage, array(), '/' . self::TEST_FILES_SHARING_API_USER1 . '/files' . self::TEST_FOLDER_NAME); } } @@ -1267,10 +1266,10 @@ class Test_Files_Sharing_Api extends TestCase { // needed because the sharing code sometimes switches the user internally and mounts the user's // storages. In our case the temp storage isn't mounted automatically, so doing it in the post hook // (similar to how ext storage works) - OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\Test_Files_Sharing_Api', 'initTestMountPointsHook'); + \OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\OCA\Files_Sharing\Tests\ApiTest', 'initTestMountPointsHook'); // logging in will auto-mount the temp storage for user1 as well - \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1); + self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $fileInfo = $this->view->getFileInfo($this->folder); @@ -1284,44 +1283,44 @@ class Test_Files_Sharing_Api extends TestCase { ); // user2: check that mount point name appears correctly - \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2); + self::loginHelper(self::TEST_FILES_SHARING_API_USER2); - $view = new \OC\Files\View('/' . \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2 . '/files'); + $view = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER2 . '/files'); $this->assertTrue($view->file_exists($this->folder)); $this->assertTrue($view->file_exists($this->folder . '/test.txt')); - \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1); + self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $this->shareManager->deleteShare($share); - \OC_Hook::clear('OC_Filesystem', 'post_initMountPoints', '\Test_Files_Sharing_Api', 'initTestMountPointsHook'); + \OC_Hook::clear('OC_Filesystem', 'post_initMountPoints', '\OCA\Files_Sharing\Tests\ApiTest', 'initTestMountPointsHook'); } /** * @expectedException \Exception */ public function testShareNonExisting() { - \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1); + self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $id = PHP_INT_MAX - 1; - \OCP\Share::shareItem('file', $id, \OCP\Share::SHARE_TYPE_LINK, \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, 31); + \OCP\Share::shareItem('file', $id, \OCP\Share::SHARE_TYPE_LINK, self::TEST_FILES_SHARING_API_USER2, 31); } /** * @expectedException \Exception */ public function testShareNotOwner() { - \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2); + self::loginHelper(self::TEST_FILES_SHARING_API_USER2); \OC\Files\Filesystem::file_put_contents('foo.txt', 'bar'); $info = \OC\Files\Filesystem::getFileInfo('foo.txt'); - \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1); + self::loginHelper(self::TEST_FILES_SHARING_API_USER1); - \OCP\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_LINK, \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, 31); + \OCP\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_LINK, self::TEST_FILES_SHARING_API_USER2, 31); } public function testDefaultExpireDate() { - \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1); + self::loginHelper(self::TEST_FILES_SHARING_API_USER1); // TODO drop this once all code paths use the DI version - otherwise // the cache inside this config object is out of date because @@ -1346,13 +1345,13 @@ class Test_Files_Sharing_Api extends TestCase { $shareCreated = $now - 3 * 24 * 60 * 60; $expireDate = date($dateFormat, $now + 2 * 24 * 60 * 60); - $info = OC\Files\Filesystem::getFileInfo($this->filename); + $info = \OC\Files\Filesystem::getFileInfo($this->filename); $this->assertTrue($info instanceof \OC\Files\FileInfo); $result = \OCP\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_LINK, null, \OCP\Constants::PERMISSION_READ); $this->assertTrue(is_string($result)); - $result = \OCP\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_USER, \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, 31); + $result = \OCP\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, 31); $this->assertTrue($result); $result = \OCP\Share::setExpirationDate('file', $info->getId() , $expireDate, $now); @@ -1376,7 +1375,7 @@ class Test_Files_Sharing_Api extends TestCase { $this->assertSame(\OCP\Share::SHARE_TYPE_USER, $share['share_type']); //cleanup - $result = \OCP\Share::unshare('file', $info->getId(), \OCP\Share::SHARE_TYPE_USER, \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2); + $result = \OCP\Share::unshare('file', $info->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2); $this->assertTrue($result); $config->setAppValue('core', 'shareapi_default_expire_date', 'no'); $config->setAppValue('core', 'shareapi_enforce_expire_date', 'no'); diff --git a/apps/files_sharing/tests/backend.php b/apps/files_sharing/tests/BackendTest.php index e5e6ceb6315..81037115f7c 100644 --- a/apps/files_sharing/tests/backend.php +++ b/apps/files_sharing/tests/BackendTest.php @@ -23,15 +23,15 @@ * */ -use OCA\Files\Share; -use OCA\Files_sharing\Tests\TestCase; +namespace OCA\Files_Sharing\Tests; + /** - * Class Test_Files_Sharing + * Class BackendTest * * @group DB */ -class Test_Files_Sharing_Backend extends TestCase { +class BackendTest extends TestCase { const TEST_FOLDER_NAME = '/folder_share_api_test'; diff --git a/apps/files_sharing/tests/cache.php b/apps/files_sharing/tests/CacheTest.php index dd727c1c6f2..f34301c9618 100644 --- a/apps/files_sharing/tests/cache.php +++ b/apps/files_sharing/tests/CacheTest.php @@ -24,18 +24,18 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ -use OCA\Files_sharing\Tests\TestCase; +namespace OCA\Files_Sharing\Tests; /** - * Class Test_Files_Sharing_Cache + * Class CacheTest * * @group DB */ -class Test_Files_Sharing_Cache extends TestCase { +class CacheTest extends TestCase { /** - * @var OC\Files\View + * @var \OC\Files\View */ public $user2View; diff --git a/apps/files_sharing/tests/capabilities.php b/apps/files_sharing/tests/CapabilitiesTest.php index 0e17811be03..08797b26810 100644 --- a/apps/files_sharing/tests/capabilities.php +++ b/apps/files_sharing/tests/CapabilitiesTest.php @@ -26,11 +26,11 @@ use OCA\Files_Sharing\Capabilities; use OCA\Files_Sharing\Tests\TestCase; /** - * Class FilesSharingCapabilitiesTest + * Class CapabilitiesTest * * @group DB */ -class FilesSharingCapabilitiesTest extends \Test\TestCase { +class CapabilitiesTest extends \Test\TestCase { /** * Test for the general part in each return statement and assert. diff --git a/apps/files_sharing/tests/controller/externalsharecontroller.php b/apps/files_sharing/tests/Controllers/ExternalShareControllerTest.php index bd20bffb36c..add6d2f08a3 100644 --- a/apps/files_sharing/tests/controller/externalsharecontroller.php +++ b/apps/files_sharing/tests/Controllers/ExternalShareControllerTest.php @@ -20,8 +20,9 @@ * */ -namespace OCA\Files_Sharing\Controllers; +namespace OCA\Files_Sharing\Tests\Controllers; +use OCA\Files_Sharing\Controllers\ExternalSharesController; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\JSONResponse; use OCP\Http\Client\IClientService; @@ -41,6 +42,7 @@ class ExternalShareControllerTest extends \Test\TestCase { private $clientService; public function setUp() { + parent::setUp(); $this->request = $this->getMockBuilder('\\OCP\\IRequest') ->disableOriginalConstructor()->getMock(); $this->externalManager = $this->getMockBuilder('\\OCA\\Files_Sharing\\External\\Manager') diff --git a/apps/files_sharing/tests/controller/sharecontroller.php b/apps/files_sharing/tests/Controllers/ShareControllerTest.php index f38ae10ca12..74e19aa29b4 100644 --- a/apps/files_sharing/tests/controller/sharecontroller.php +++ b/apps/files_sharing/tests/Controllers/ShareControllerTest.php @@ -26,10 +26,11 @@ * */ -namespace OCA\Files_Sharing\Controllers; +namespace OCA\Files_Sharing\Tests\Controllers; use OC\Files\Filesystem; use OCA\FederatedFileSharing\FederatedShareProvider; +use OCA\Files_Sharing\Controllers\ShareController; use OCP\Share\Exceptions\ShareNotFound; use OCP\AppFramework\Http\NotFoundResponse; use OCP\AppFramework\Http\RedirectResponse; @@ -71,6 +72,7 @@ class ShareControllerTest extends \Test\TestCase { private $federatedShareProvider; protected function setUp() { + parent::setUp(); $this->appName = 'files_sharing'; $this->shareManager = $this->getMockBuilder('\OC\Share20\Manager')->disableOriginalConstructor()->getMock(); @@ -126,6 +128,7 @@ class ShareControllerTest extends \Test\TestCase { // Set old user \OC_User::setUserId($this->oldUser); \OC_Util::setupFS($this->oldUser); + parent::tearDown(); } public function testShowAuthenticateNotAuthenticated() { diff --git a/apps/files_sharing/tests/deleteorphanedsharesjobtest.php b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php index c9aea60d255..69d9ab228f2 100644 --- a/apps/files_sharing/tests/deleteorphanedsharesjobtest.php +++ b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php @@ -20,16 +20,16 @@ * */ -namespace Test\BackgroundJob; +namespace OCA\Files_Sharing\Tests; -use OCA\Files_sharing\Lib\DeleteOrphanedSharesJob; +use OCA\Files_Sharing\DeleteOrphanedSharesJob; /** * Class DeleteOrphanedSharesJobTest * * @group DB * - * @package Test\BackgroundJob + * @package OCA\Files_Sharing\Tests */ class DeleteOrphanedSharesJobTest extends \Test\TestCase { diff --git a/apps/files_sharing/tests/encryptedsizepropagation.php b/apps/files_sharing/tests/EncryptedSizePropagationTest.php index e341606abe4..0abd9c39c99 100644 --- a/apps/files_sharing/tests/encryptedsizepropagation.php +++ b/apps/files_sharing/tests/EncryptedSizePropagationTest.php @@ -19,7 +19,7 @@ * */ -namespace OCA\Files_sharing\Tests; +namespace OCA\Files_Sharing\Tests; use OC\Files\View; use Test\Traits\EncryptionTrait; @@ -27,7 +27,7 @@ use Test\Traits\EncryptionTrait; /** * @group DB */ -class EncryptedSizePropagation extends SizePropagation { +class EncryptedSizePropagationTest extends SizePropagationTest { use EncryptionTrait; protected function setupUser($name, $password = '') { diff --git a/apps/files_sharing/tests/etagpropagation.php b/apps/files_sharing/tests/EtagPropagationTest.php index e7d5bb46258..bf53beccab1 100644 --- a/apps/files_sharing/tests/etagpropagation.php +++ b/apps/files_sharing/tests/EtagPropagationTest.php @@ -23,19 +23,19 @@ * */ -namespace OCA\Files_sharing\Tests; +namespace OCA\Files_Sharing\Tests; use OC\Files\Filesystem; use OC\Files\View; /** - * Class EtagPropagation + * Class EtagPropagationTest * * @group DB * - * @package OCA\Files_sharing\Tests + * @package OCA\Files_Sharing\Tests */ -class EtagPropagation extends PropagationTestCase { +class EtagPropagationTest extends PropagationTestCase { /** * "user1" is the admin who shares a folder "sub1/sub2/folder" with "user2" and "user3" diff --git a/apps/files_sharing/tests/expiresharesjobtest.php b/apps/files_sharing/tests/ExpireSharesJobTest.php index bb4f756e6c7..bb4f756e6c7 100644 --- a/apps/files_sharing/tests/expiresharesjobtest.php +++ b/apps/files_sharing/tests/ExpireSharesJobTest.php diff --git a/apps/files_sharing/tests/external/cache.php b/apps/files_sharing/tests/External/CacheTest.php index 4ae1bc563df..6f207e1e4ab 100644 --- a/apps/files_sharing/tests/external/cache.php +++ b/apps/files_sharing/tests/External/CacheTest.php @@ -20,18 +20,18 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ -namespace OCA\Files_sharing\Tests\External; +namespace OCA\Files_Sharing\Tests\External; -use OCA\Files_sharing\Tests\TestCase; +use OCA\Files_Sharing\Tests\TestCase; /** * Class Cache * * @group DB * - * @package OCA\Files_sharing\Tests\External + * @package OCA\Files_Sharing\Tests\External */ -class Cache extends TestCase { +class CacheTest extends TestCase { /** * @var \OC\Files\Storage\Storage diff --git a/apps/files_sharing/tests/external/managertest.php b/apps/files_sharing/tests/External/ManagerTest.php index 48a9098ae1d..48a9098ae1d 100644 --- a/apps/files_sharing/tests/external/managertest.php +++ b/apps/files_sharing/tests/External/ManagerTest.php diff --git a/apps/files_sharing/tests/external/scannertest.php b/apps/files_sharing/tests/External/ScannerTest.php index f16e9952fce..f16e9952fce 100644 --- a/apps/files_sharing/tests/external/scannertest.php +++ b/apps/files_sharing/tests/External/ScannerTest.php diff --git a/apps/files_sharing/tests/externalstorage.php b/apps/files_sharing/tests/ExternalStorageTest.php index 54cd7d1645c..c5ff4ad0236 100644 --- a/apps/files_sharing/tests/externalstorage.php +++ b/apps/files_sharing/tests/ExternalStorageTest.php @@ -23,12 +23,14 @@ * */ +namespace OCA\Files_Sharing\Tests; + /** * Tests for the external Storage class for remote shares. * * @group DB */ -class Test_Files_Sharing_External_Storage extends \Test\TestCase { +class ExternalStorageTest extends \Test\TestCase { function optionsProvider() { return array( diff --git a/apps/files_sharing/tests/groupetagpropagation.php b/apps/files_sharing/tests/GroupEtagPropagationTest.php index aaa81135279..c78be79eaa1 100644 --- a/apps/files_sharing/tests/groupetagpropagation.php +++ b/apps/files_sharing/tests/GroupEtagPropagationTest.php @@ -19,7 +19,7 @@ * */ -namespace OCA\Files_sharing\Tests; +namespace OCA\Files_Sharing\Tests; use OC\Files\Filesystem; use OC\Files\View; @@ -27,9 +27,9 @@ use OC\Files\View; /** * @group DB * - * @package OCA\Files_sharing\Tests + * @package OCA\Files_Sharing\Tests */ -class GroupEtagPropagation extends PropagationTestCase { +class GroupEtagPropagationTest extends PropagationTestCase { /** * "user1" creates /test, /test/sub and shares with group1 * "user2" (in group1) reshares /test with group2 and reshared /test/sub with group3 diff --git a/apps/files_sharing/tests/helper.php b/apps/files_sharing/tests/HelperTest.php index 07f07f911cb..6382a8e18ac 100644 --- a/apps/files_sharing/tests/helper.php +++ b/apps/files_sharing/tests/HelperTest.php @@ -20,14 +20,15 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ -use OCA\Files_sharing\Tests\TestCase; + +namespace OCA\Files_Sharing\Tests; /** - * Class Test_Files_Sharing_Helper + * Class HelperTest * * @group DB */ -class Test_Files_Sharing_Helper extends TestCase { +class HelperTest extends TestCase { /** * test set and get share folder diff --git a/apps/files_sharing/tests/locking.php b/apps/files_sharing/tests/LockingTest.php index 932afe006f9..be6fa04437a 100644 --- a/apps/files_sharing/tests/locking.php +++ b/apps/files_sharing/tests/LockingTest.php @@ -21,20 +21,20 @@ * */ -namespace OCA\Files_sharing\Tests; +namespace OCA\Files_Sharing\Tests; use OC\Files\Filesystem; use OC\Files\View; use OCP\Lock\ILockingProvider; /** - * Class Locking + * Class LockingTest * * @group DB * - * @package OCA\Files_sharing\Tests + * @package OCA\Files_Sharing\Tests */ -class Locking extends TestCase { +class LockingTest extends TestCase { /** * @var \Test\Util\User\Dummy */ diff --git a/apps/files_sharing/tests/middleware/sharingcheckmiddleware.php b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php index e80be772a92..e80be772a92 100644 --- a/apps/files_sharing/tests/middleware/sharingcheckmiddleware.php +++ b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php diff --git a/apps/files_sharing/tests/migrationtest.php b/apps/files_sharing/tests/MigrationTest.php index 82e6f47addb..4b44d7a367e 100644 --- a/apps/files_sharing/tests/migrationtest.php +++ b/apps/files_sharing/tests/MigrationTest.php @@ -22,8 +22,9 @@ * */ +namespace OCA\Files_Sharing\Tests; + -use OCA\Files_Sharing\Tests\TestCase; use OCA\Files_Sharing\Migration; /** diff --git a/apps/files_sharing/tests/permissions.php b/apps/files_sharing/tests/PermissionsTest.php index c1568ceab0a..f22003c468c 100644 --- a/apps/files_sharing/tests/permissions.php +++ b/apps/files_sharing/tests/PermissionsTest.php @@ -22,16 +22,20 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + + +namespace OCA\Files_Sharing\Tests; + use OC\Files\Cache\Cache; use OC\Files\Storage\Storage; use OC\Files\View; /** - * Class Test_Files_Sharing_Permissions + * Class PermissionsTest * * @group DB */ -class Test_Files_Sharing_Permissions extends OCA\Files_sharing\Tests\TestCase { +class PermissionsTest extends TestCase { /** @var Storage */ private $sharedStorageRestrictedShare; diff --git a/apps/files_sharing/tests/propagationtestcase.php b/apps/files_sharing/tests/PropagationTestCase.php index 159a7b859aa..1eec2093f7e 100644 --- a/apps/files_sharing/tests/propagationtestcase.php +++ b/apps/files_sharing/tests/PropagationTestCase.php @@ -19,7 +19,7 @@ * */ -namespace OCA\Files_sharing\Tests; +namespace OCA\Files_Sharing\Tests; abstract class PropagationTestCase extends TestCase { /** diff --git a/apps/files_sharing/tests/share.php b/apps/files_sharing/tests/ShareTest.php index 7707cca190f..b4ebfde88ed 100644 --- a/apps/files_sharing/tests/share.php +++ b/apps/files_sharing/tests/ShareTest.php @@ -24,14 +24,14 @@ * */ -use OCA\Files\Share; +namespace OCA\Files_Sharing\Tests; /** - * Class Test_Files_Sharing + * Class ShareTest * * @group DB */ -class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase { +class ShareTest extends TestCase { const TEST_FOLDER_NAME = '/folder_share_api_test'; @@ -112,7 +112,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase { } /** - * @param OC\Files\FileInfo[] $content + * @param \OC\Files\FileInfo[] $content * @param string[] $expected */ public function verifyDirContent($content, $expected) { @@ -240,10 +240,10 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase { \OCP\Constants::PERMISSION_READ ); - $this->loginHelper(\Test_Files_Sharing::TEST_FILES_SHARING_API_USER2); + $this->loginHelper(self::TEST_FILES_SHARING_API_USER2); $info = \OC\Files\Filesystem::getFileInfo($this->filename); - $this->assertSame(\Test_Files_Sharing::TEST_FILES_SHARING_API_USER1, $info->getOwner()->getUID()); + $this->assertSame(self::TEST_FILES_SHARING_API_USER1, $info->getOwner()->getUID()); } } diff --git a/apps/files_sharing/tests/sharedmount.php b/apps/files_sharing/tests/SharedMountTest.php index 48040ab8dc9..300291357ba 100644 --- a/apps/files_sharing/tests/sharedmount.php +++ b/apps/files_sharing/tests/SharedMountTest.php @@ -25,12 +25,14 @@ * */ +namespace OCA\Files_Sharing\Tests; + /** - * Class Test_Files_Sharing_Api + * Class SharedMountTest * * @group DB */ -class Test_Files_Sharing_Mount extends OCA\Files_sharing\Tests\TestCase { +class SharedMountTest extends TestCase { protected function setUp() { parent::setUp(); diff --git a/apps/files_sharing/tests/sharedstorage.php b/apps/files_sharing/tests/SharedStorageTest.php index 19edc44f9b4..6d9eaf6c34b 100644 --- a/apps/files_sharing/tests/sharedstorage.php +++ b/apps/files_sharing/tests/SharedStorageTest.php @@ -24,14 +24,14 @@ * */ -use OCA\Files\Share; +namespace OCA\Files_Sharing\Tests; /** - * Class Test_Files_Sharing_Api + * Class SharedStorageTest * * @group DB */ -class Test_Files_Sharing_Storage extends OCA\Files_sharing\Tests\TestCase { +class SharedStorageTest extends TestCase { protected function setUp() { parent::setUp(); diff --git a/apps/files_sharing/tests/sizepropagation.php b/apps/files_sharing/tests/SizePropagationTest.php index c0f5696c16d..b96532b7f3e 100644 --- a/apps/files_sharing/tests/sizepropagation.php +++ b/apps/files_sharing/tests/SizePropagationTest.php @@ -21,20 +21,20 @@ * */ -namespace OCA\Files_sharing\Tests; +namespace OCA\Files_Sharing\Tests; use OC\Files\View; use Test\Traits\MountProviderTrait; use Test\Traits\UserTrait; /** - * Class SizePropagation + * Class SizePropagationTest * * @group DB * - * @package OCA\Files_sharing\Tests + * @package OCA\Files_Sharing\Tests */ -class SizePropagation extends TestCase { +class SizePropagationTest extends TestCase { use UserTrait; use MountProviderTrait; diff --git a/apps/files_sharing/tests/testcase.php b/apps/files_sharing/tests/TestCase.php index b1d6facafd6..a5c412639e7 100644 --- a/apps/files_sharing/tests/testcase.php +++ b/apps/files_sharing/tests/TestCase.php @@ -31,11 +31,10 @@ namespace OCA\Files_Sharing\Tests; use OC\Files\Filesystem; -use OCA\Files\Share; -use OCA\Files_Sharing\Appinfo\Application; +use OCA\Files_Sharing\AppInfo\Application; /** - * Class Test_Files_Sharing_Base + * Class TestCase * * @group DB * diff --git a/apps/files_sharing/tests/unsharechildren.php b/apps/files_sharing/tests/UnshareChildrenTest.php index 6104dc98080..63e4428a25e 100644 --- a/apps/files_sharing/tests/unsharechildren.php +++ b/apps/files_sharing/tests/UnshareChildrenTest.php @@ -23,18 +23,16 @@ * */ -namespace OCA\Files_sharing\Tests; - -use OCA\Files\Share; +namespace OCA\Files_Sharing\Tests; /** - * Class UnshareChildren + * Class UnshareChildrenTest * * @group DB * - * @package OCA\Files_sharing\Tests + * @package OCA\Files_Sharing\Tests */ -class UnshareChildren extends TestCase { +class UnshareChildrenTest extends TestCase { protected $subsubfolder; diff --git a/apps/files_sharing/tests/updater.php b/apps/files_sharing/tests/UpdaterTest.php index 53e7fc47665..659c04ad987 100644 --- a/apps/files_sharing/tests/updater.php +++ b/apps/files_sharing/tests/UpdaterTest.php @@ -24,13 +24,14 @@ * */ +namespace OCA\Files_Sharing\Tests; /** - * Class Test_Files_Sharing_Updater + * Class UpdaterTest * * @group DB */ -class Test_Files_Sharing_Updater extends OCA\Files_Sharing\Tests\TestCase { +class UpdaterTest extends TestCase { const TEST_FOLDER_NAME = '/folder_share_updater_test'; diff --git a/apps/files_sharing/tests/watcher.php b/apps/files_sharing/tests/WatcherTest.php index 19e1bc0b615..512381cf1dc 100644 --- a/apps/files_sharing/tests/watcher.php +++ b/apps/files_sharing/tests/WatcherTest.php @@ -25,12 +25,14 @@ * */ +namespace OCA\Files_Sharing\Tests; + /** - * Class Test_Files_Sharing_Watcher + * Class WatcherTest * * @group DB */ -class Test_Files_Sharing_Watcher extends OCA\Files_sharing\Tests\TestCase { +class WatcherTest extends TestCase { /** @var \OC\Files\Storage\Storage */ private $ownerStorage; |