summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing')
-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)3
-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
32 files changed, 118 insertions, 104 deletions
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 9078a3d4578..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;
/**
- * 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;