Merge pull request #24661 from owncloud/files_sharing-psr4

Move Files_Sharing to PSR-4
This commit is contained in:
Vincent Petry 2016-05-25 15:40:05 +02:00
commit d22aeb749d
68 changed files with 128 additions and 113 deletions

View File

@ -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();

View File

@ -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>

View File

@ -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'],

View File

@ -20,7 +20,7 @@
*
*/
namespace OCA\Files_sharing\Lib;
namespace OCA\Files_Sharing;
use OC\BackgroundJob\TimedJob;

View File

@ -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;

View File

@ -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

View File

@ -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');

View File

@ -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';

View File

@ -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;

View File

@ -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.

View File

@ -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')

View File

@ -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() {

View File

@ -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 {

View File

@ -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 = '') {

View File

@ -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"

View File

@ -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

View File

@ -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(

View File

@ -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

View File

@ -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

View File

@ -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
*/

View File

@ -22,8 +22,9 @@
*
*/
namespace OCA\Files_Sharing\Tests;
use OCA\Files_Sharing\Tests\TestCase;
use OCA\Files_Sharing\Migration;
/**

View File

@ -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;

View File

@ -19,7 +19,7 @@
*
*/
namespace OCA\Files_sharing\Tests;
namespace OCA\Files_Sharing\Tests;
abstract class PropagationTestCase extends TestCase {
/**

View File

@ -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());
}
}

View File

@ -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();

View File

@ -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();

View File

@ -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;

View File

@ -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
*

View File

@ -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;

View File

@ -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';

View File

@ -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;

View File

@ -73,6 +73,8 @@ class DropOldJobs implements IRepairStep {
['class' => 'OC_Cache_FileGlobalGC', 'arguments' => null],
['class' => 'OC\Cache\FileGlobalGC', 'arguments' => null],
['class' => 'OCA\Files\BackgroundJob\DeleteOrphanedTagsJob', 'arguments' => null],
['class' => 'OCA\Files_sharing\Lib\DeleteOrphanedSharesJob', 'arguments' => null],
['class' => 'OCA\Files_sharing\ExpireSharesJob', 'arguments' => null],
];
}