Move stuff from outside lib/ to PSR-4
This commit is contained in:
parent
adcf942901
commit
328b3c47d7
49 changed files with 68 additions and 129 deletions
|
@ -31,7 +31,7 @@ OC::$CLASSPATH['OC_Mount_Config'] = 'files_external/lib/config.php';
|
|||
require_once __DIR__ . '/../3rdparty/autoload.php';
|
||||
|
||||
// register Application object singleton
|
||||
\OC_Mount_Config::$app = new \OCA\Files_external\Appinfo\Application();
|
||||
\OC_Mount_Config::$app = new \OCA\Files_External\AppInfo\Application();
|
||||
$appContainer = \OC_Mount_Config::$app->getContainer();
|
||||
|
||||
\OC_Mount_Config::$app->registerSettings();
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
</types>
|
||||
<ocsid>166048</ocsid>
|
||||
|
||||
<namespace>Files_External</namespace>
|
||||
|
||||
<dependencies>
|
||||
<owncloud min-version="9.1" max-version="9.1" />
|
||||
</dependencies>
|
||||
|
|
|
@ -37,9 +37,9 @@ $groupManager = OC::$server->getGroupManager();
|
|||
|
||||
$app = \OC_Mount_Config::$app;
|
||||
|
||||
$globalStorageService = $app->getContainer()->query('\OCA\Files_external\Service\GlobalStoragesService');
|
||||
$userStorageService = $app->getContainer()->query('\OCA\Files_external\Service\UserStoragesService');
|
||||
$importLegacyStorageService = $app->getContainer()->query('\OCA\Files_external\Service\ImportLegacyStoragesService');
|
||||
$globalStorageService = $app->getContainer()->query('\OCA\Files_External\Service\GlobalStoragesService');
|
||||
$userStorageService = $app->getContainer()->query('\OCA\Files_External\Service\UserStoragesService');
|
||||
$importLegacyStorageService = $app->getContainer()->query('\OCA\Files_External\Service\ImportLegacyStoragesService');
|
||||
$backendService = $app->getContainer()->query('OCA\Files_External\Service\BackendService');
|
||||
|
||||
/** @var Symfony\Component\Console\Application $application */
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Files_External\AppInfo;
|
||||
|
||||
/**
|
||||
* @var $this \OCP\Route\IRouter
|
||||
**/
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
|
||||
$installedVersion = \OC::$server->getConfig()->getAppValue('files_external', 'installed_version');
|
||||
|
||||
$app = new \OCA\Files_external\Appinfo\Application();
|
||||
$app = new \OCA\Files_External\AppInfo\Application();
|
||||
|
||||
// Migration to db config
|
||||
if (version_compare($installedVersion, '0.5.0', '<')) {
|
||||
$migrator = $app->getContainer()->query('OCA\Files_external\Migration\StorageMigrator');
|
||||
$migrator = $app->getContainer()->query('OCA\Files_External\Migration\StorageMigrator');
|
||||
$migrator->migrateGlobal();
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ use \OCA\Files_External\Lib\Config\IBackendProvider;
|
|||
use \OCA\Files_External\Lib\Config\IAuthMechanismProvider;
|
||||
|
||||
/**
|
||||
* @package OCA\Files_External\Appinfo
|
||||
* @package OCA\Files_External\AppInfo
|
||||
*/
|
||||
class Application extends App implements IBackendProvider, IAuthMechanismProvider {
|
||||
|
|
@ -24,12 +24,9 @@ namespace OCA\Files_External\Command;
|
|||
use OC\Core\Command\Base;
|
||||
use OCA\Files_external\Lib\StorageConfig;
|
||||
use OCA\Files_external\NotFoundException;
|
||||
use OCA\Files_external\Service\GlobalStoragesService;
|
||||
use OCA\Files_External\Service\GlobalStoragesService;
|
||||
use OCP\IGroupManager;
|
||||
use OCP\IUserManager;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Helper\Table;
|
||||
use Symfony\Component\Console\Helper\TableHelper;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
|
@ -24,7 +24,7 @@ namespace OCA\Files_External\Command;
|
|||
use OC\Core\Command\Base;
|
||||
use OCA\Files_external\Lib\StorageConfig;
|
||||
use OCA\Files_external\NotFoundException;
|
||||
use OCA\Files_external\Service\GlobalStoragesService;
|
||||
use OCA\Files_External\Service\GlobalStoragesService;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Helper\Table;
|
||||
use Symfony\Component\Console\Helper\TableHelper;
|
|
@ -29,19 +29,14 @@ use OCA\Files_External\Lib\Backend\Backend;
|
|||
use OCA\Files_External\Lib\DefinitionParameter;
|
||||
use OCA\Files_external\Lib\StorageConfig;
|
||||
use OCA\Files_External\Service\BackendService;
|
||||
use OCA\Files_external\Service\GlobalStoragesService;
|
||||
use OCA\Files_external\Service\ImportLegacyStoragesService;
|
||||
use OCA\Files_external\Service\UserStoragesService;
|
||||
use OCA\Files_External\Service\GlobalStoragesService;
|
||||
use OCA\Files_External\Service\UserStoragesService;
|
||||
use OCP\IUserManager;
|
||||
use OCP\IUserSession;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Helper\Table;
|
||||
use Symfony\Component\Console\Helper\TableHelper;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\Input;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class Create extends Base {
|
|
@ -22,15 +22,11 @@
|
|||
namespace OCA\Files_External\Command;
|
||||
|
||||
use OC\Core\Command\Base;
|
||||
use OCA\Files_external\Lib\StorageConfig;
|
||||
use OCA\Files_external\NotFoundException;
|
||||
use OCA\Files_external\Service\GlobalStoragesService;
|
||||
use OCA\Files_external\Service\UserStoragesService;
|
||||
use OCA\Files_External\Service\GlobalStoragesService;
|
||||
use OCA\Files_External\Service\UserStoragesService;
|
||||
use OCP\IUserManager;
|
||||
use OCP\IUserSession;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Helper\Table;
|
||||
use Symfony\Component\Console\Helper\TableHelper;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
|
@ -25,19 +25,15 @@ use OC\Core\Command\Base;
|
|||
use OC\User\NoUserException;
|
||||
use OCA\Files_external\Lib\StorageConfig;
|
||||
use OCA\Files_External\Service\BackendService;
|
||||
use OCA\Files_external\Service\GlobalStoragesService;
|
||||
use OCA\Files_external\Service\ImportLegacyStoragesService;
|
||||
use OCA\Files_external\Service\UserStoragesService;
|
||||
use OCA\Files_External\Service\GlobalStoragesService;
|
||||
use OCA\Files_External\Service\ImportLegacyStoragesService;
|
||||
use OCA\Files_External\Service\UserStoragesService;
|
||||
use OCP\IUserManager;
|
||||
use OCP\IUserSession;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Helper\Table;
|
||||
use Symfony\Component\Console\Helper\TableHelper;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\Input;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class Import extends Base {
|
|
@ -24,11 +24,10 @@ namespace OCA\Files_External\Command;
|
|||
use OC\Core\Command\Base;
|
||||
use OC\User\NoUserException;
|
||||
use OCA\Files_external\Lib\StorageConfig;
|
||||
use OCA\Files_external\Service\GlobalStoragesService;
|
||||
use OCA\Files_external\Service\UserStoragesService;
|
||||
use OCA\Files_External\Service\GlobalStoragesService;
|
||||
use OCA\Files_External\Service\UserStoragesService;
|
||||
use OCP\IUserManager;
|
||||
use OCP\IUserSession;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Helper\Table;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
|
@ -21,18 +21,8 @@
|
|||
|
||||
namespace OCA\Files_External\Command;
|
||||
|
||||
use OC\Core\Command\Base;
|
||||
use OCA\Files_external\Lib\StorageConfig;
|
||||
use OCA\Files_external\Service\GlobalStoragesService;
|
||||
use OCA\Files_external\Service\UserStoragesService;
|
||||
use OCP\IUserManager;
|
||||
use OCP\IUserSession;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Helper\Table;
|
||||
use Symfony\Component\Console\Helper\TableHelper;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class Option extends Config {
|
|
@ -27,11 +27,8 @@ use OCA\Files_External\Lib\Backend\Backend;
|
|||
use OCA\Files_External\Lib\InsufficientDataForMeaningfulAnswerException;
|
||||
use OCA\Files_external\Lib\StorageConfig;
|
||||
use OCA\Files_external\NotFoundException;
|
||||
use OCA\Files_external\Service\GlobalStoragesService;
|
||||
use OCA\Files_External\Service\GlobalStoragesService;
|
||||
use OCP\Files\StorageNotAvailableException;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Helper\Table;
|
||||
use Symfony\Component\Console\Helper\TableHelper;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
|
@ -24,18 +24,13 @@
|
|||
namespace OCA\Files_External\Controller;
|
||||
|
||||
|
||||
use \OCP\IConfig;
|
||||
use OCP\ILogger;
|
||||
use \OCP\IUserSession;
|
||||
use \OCP\IRequest;
|
||||
use \OCP\IL10N;
|
||||
use \OCP\AppFramework\Http\DataResponse;
|
||||
use \OCP\AppFramework\Controller;
|
||||
use \OCP\AppFramework\Http;
|
||||
use \OCA\Files_external\Service\GlobalStoragesService;
|
||||
use OCA\Files_External\Service\GlobalStoragesService;
|
||||
use \OCA\Files_external\NotFoundException;
|
||||
use \OCA\Files_external\Lib\StorageConfig;
|
||||
use \OCA\Files_External\Service\BackendService;
|
||||
|
||||
/**
|
||||
* Global storages controller
|
|
@ -25,23 +25,19 @@
|
|||
namespace OCA\Files_External\Controller;
|
||||
|
||||
|
||||
use \OCP\IConfig;
|
||||
use OCP\ILogger;
|
||||
use OCP\IUser;
|
||||
use \OCP\IUserSession;
|
||||
use \OCP\IRequest;
|
||||
use \OCP\IL10N;
|
||||
use \OCP\AppFramework\Http\DataResponse;
|
||||
use \OCP\AppFramework\Controller;
|
||||
use \OCP\AppFramework\Http;
|
||||
use \OCA\Files_external\Service\StoragesService;
|
||||
use OCA\Files_External\Service\StoragesService;
|
||||
use \OCA\Files_external\NotFoundException;
|
||||
use \OCA\Files_external\Lib\StorageConfig;
|
||||
use \OCA\Files_External\Lib\Backend\Backend;
|
||||
use \OCA\Files_External\Lib\Auth\AuthMechanism;
|
||||
use \OCP\Files\StorageNotAvailableException;
|
||||
use \OCA\Files_External\Lib\InsufficientDataForMeaningfulAnswerException;
|
||||
use \OCA\Files_External\Service\BackendService;
|
||||
|
||||
/**
|
||||
* Base class for storages controllers
|
|
@ -30,7 +30,7 @@ use \OCP\IRequest;
|
|||
use \OCP\IL10N;
|
||||
use \OCP\AppFramework\Http\DataResponse;
|
||||
use \OCP\AppFramework\Http;
|
||||
use \OCA\Files_external\Service\UserGlobalStoragesService;
|
||||
use OCA\Files_External\Service\UserGlobalStoragesService;
|
||||
use \OCA\Files_external\NotFoundException;
|
||||
use \OCA\Files_external\Lib\StorageConfig;
|
||||
use \OCA\Files_External\Lib\Backend\Backend;
|
|
@ -25,17 +25,13 @@ namespace OCA\Files_External\Controller;
|
|||
|
||||
|
||||
use OCA\Files_External\Lib\Auth\AuthMechanism;
|
||||
use \OCP\IConfig;
|
||||
use OCP\ILogger;
|
||||
use OCP\IUser;
|
||||
use \OCP\IUserSession;
|
||||
use \OCP\IRequest;
|
||||
use \OCP\IL10N;
|
||||
use \OCP\AppFramework\Http\DataResponse;
|
||||
use \OCP\AppFramework\Controller;
|
||||
use \OCP\AppFramework\Http;
|
||||
use \OCA\Files_external\Service\UserStoragesService;
|
||||
use \OCA\Files_External\Service\BackendService;
|
||||
use OCA\Files_External\Service\UserStoragesService;
|
||||
use \OCA\Files_external\NotFoundException;
|
||||
use \OCA\Files_external\Lib\StorageConfig;
|
||||
use \OCA\Files_External\Lib\Backend\Backend;
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Files_external\Migration;
|
||||
namespace OCA\Files_External\Migration;
|
||||
|
||||
use OCP\IUser;
|
||||
use OCP\IUserSession;
|
|
@ -20,22 +20,18 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Files_external\Migration;
|
||||
namespace OCA\Files_External\Migration;
|
||||
|
||||
use OCA\Files_External\Service\BackendService;
|
||||
use OCA\Files_External\Service\DBConfigService;
|
||||
use OCA\Files_external\Service\GlobalLegacyStoragesService;
|
||||
use OCA\Files_external\Service\GlobalStoragesService;
|
||||
use OCA\Files_external\Service\LegacyStoragesService;
|
||||
use OCA\Files_external\Service\StoragesService;
|
||||
use OCA\Files_external\Service\UserLegacyStoragesService;
|
||||
use OCA\Files_external\Service\UserStoragesService;
|
||||
use OCA\Files_External\Service\GlobalStoragesService;
|
||||
use OCA\Files_External\Service\LegacyStoragesService;
|
||||
use OCA\Files_External\Service\StoragesService;
|
||||
use OCP\Files\Config\IUserMountCache;
|
||||
use OCP\IConfig;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\ILogger;
|
||||
use OCP\IUser;
|
||||
use OCP\IUserSession;
|
||||
|
||||
/**
|
||||
* Migrate mount config from mount.json to the database
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Files_external\Service;
|
||||
namespace OCA\Files_External\Service;
|
||||
|
||||
/**
|
||||
* Read admin defined mounts from the legacy mount.json
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Files_external\Service;
|
||||
namespace OCA\Files_External\Service;
|
||||
|
||||
use \OCP\IUserSession;
|
||||
use \OC\Files\Filesystem;
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Files_external\Service;
|
||||
namespace OCA\Files_External\Service;
|
||||
|
||||
class ImportLegacyStoragesService extends LegacyStoragesService {
|
||||
private $data;
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Files_external\Service;
|
||||
namespace OCA\Files_External\Service;
|
||||
|
||||
use \OCA\Files_external\Lib\StorageConfig;
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Files_external\Service;
|
||||
namespace OCA\Files_External\Service;
|
||||
|
||||
use \OC\Files\Filesystem;
|
||||
use \OCA\Files_external\Lib\StorageConfig;
|
|
@ -22,12 +22,9 @@
|
|||
|
||||
namespace OCA\Files_External\Service;
|
||||
|
||||
use \OCA\Files_external\Service\GlobalStoragesService;
|
||||
use \OCA\Files_External\Service\BackendService;
|
||||
use OCP\Files\Config\IUserMountCache;
|
||||
use \OCP\IUserSession;
|
||||
use \OCP\IGroupManager;
|
||||
use \OCA\Files_External\Service\UserTrait;
|
||||
use \OCA\Files_External\Lib\StorageConfig;
|
||||
|
||||
/**
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Files_external\Service;
|
||||
namespace OCA\Files_External\Service;
|
||||
|
||||
use OCP\IUserSession;
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Files_external\Service;
|
||||
namespace OCA\Files_External\Service;
|
||||
|
||||
use OCP\Files\Config\IUserMountCache;
|
||||
use \OCP\IUserSession;
|
|
@ -24,14 +24,14 @@
|
|||
namespace OCA\Files_External\Config;
|
||||
|
||||
use OC\Files\Storage\Wrapper\Availability;
|
||||
use OCA\Files_external\Migration\StorageMigrator;
|
||||
use OCA\Files_External\Migration\StorageMigrator;
|
||||
use OCP\Files\Storage;
|
||||
use OC\Files\Mount\MountPoint;
|
||||
use OCP\Files\Storage\IStorageFactory;
|
||||
use OCA\Files_External\Lib\PersonalMount;
|
||||
use OCP\Files\Config\IMountProvider;
|
||||
use OCP\IUser;
|
||||
use OCA\Files_external\Service\UserStoragesService;
|
||||
use OCA\Files_External\Service\UserStoragesService;
|
||||
use OCA\Files_External\Service\UserGlobalStoragesService;
|
||||
use OCA\Files_External\Lib\StorageConfig;
|
||||
use OC\Files\Storage\FailedStorage;
|
||||
|
|
|
@ -29,7 +29,7 @@ use \OCA\Files_External\Service\BackendService;
|
|||
// we must use the same container
|
||||
$appContainer = \OC_Mount_Config::$app->getContainer();
|
||||
$backendService = $appContainer->query('OCA\Files_External\Service\BackendService');
|
||||
$userStoragesService = $appContainer->query('OCA\Files_external\Service\UserStoragesService');
|
||||
$userStoragesService = $appContainer->query('OCA\Files_External\Service\UserStoragesService');
|
||||
|
||||
$tmpl = new OCP\Template('files_external', 'settings');
|
||||
$tmpl->assign('encryptionEnabled', \OC::$server->getEncryptionManager()->isEnabled());
|
||||
|
|
|
@ -31,7 +31,7 @@ use \OCA\Files_External\Service\BackendService;
|
|||
// we must use the same container
|
||||
$appContainer = \OC_Mount_Config::$app->getContainer();
|
||||
$backendService = $appContainer->query('OCA\Files_External\Service\BackendService');
|
||||
$globalStoragesService = $appContainer->query('OCA\Files_external\Service\GlobalStoragesService');
|
||||
$globalStoragesService = $appContainer->query('OCA\Files_External\Service\GlobalStoragesService');
|
||||
|
||||
\OC_Util::addVendorScript('select2/select2');
|
||||
\OC_Util::addVendorStyle('select2/select2');
|
||||
|
|
|
@ -32,10 +32,10 @@ use Test\TestCase;
|
|||
abstract class CommandTest extends TestCase {
|
||||
/**
|
||||
* @param StorageConfig[] $mounts
|
||||
* @return \OCA\Files_external\Service\GlobalStoragesService|\PHPUnit_Framework_MockObject_MockObject
|
||||
* @return \OCA\Files_External\Service\GlobalStoragesService|\PHPUnit_Framework_MockObject_MockObject
|
||||
*/
|
||||
protected function getGlobalStorageService(array $mounts = []) {
|
||||
$mock = $this->getMockBuilder('OCA\Files_external\Service\GlobalStoragesService')
|
||||
$mock = $this->getMockBuilder('OCA\Files_External\Service\GlobalStoragesService')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
|
@ -34,10 +34,10 @@ class ListCommandTest extends CommandTest {
|
|||
* @return \OCA\Files_External\Command\ListCommand|\PHPUnit_Framework_MockObject_MockObject
|
||||
*/
|
||||
private function getInstance() {
|
||||
/** @var \OCA\Files_external\Service\GlobalStoragesService|\PHPUnit_Framework_MockObject_MockObject $globalService */
|
||||
$globalService = $this->getMock('\OCA\Files_external\Service\GlobalStoragesService', null, [], '', false);
|
||||
/** @var \OCA\Files_external\Service\UserStoragesService|\PHPUnit_Framework_MockObject_MockObject $userService */
|
||||
$userService = $this->getMock('\OCA\Files_external\Service\UserStoragesService', null, [], '', false);
|
||||
/** @var \OCA\Files_External\Service\GlobalStoragesService|\PHPUnit_Framework_MockObject_MockObject $globalService */
|
||||
$globalService = $this->getMock('\OCA\Files_External\Service\GlobalStoragesService', null, [], '', false);
|
||||
/** @var \OCA\Files_External\Service\UserStoragesService|\PHPUnit_Framework_MockObject_MockObject $userService */
|
||||
$userService = $this->getMock('\OCA\Files_External\Service\UserStoragesService', null, [], '', false);
|
||||
/** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject $userManager */
|
||||
$userManager = $this->getMock('\OCP\IUserManager');
|
||||
/** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject $userSession */
|
|
@ -20,18 +20,16 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*/
|
||||
namespace OCA\Files_external\Tests\Controller;
|
||||
namespace OCA\Files_External\Tests\Controller;
|
||||
|
||||
use \OCA\Files_external\Controller\GlobalStoragesController;
|
||||
use \OCA\Files_external\Service\GlobalStoragesService;
|
||||
use OCA\Files_External\Controller\GlobalStoragesController;
|
||||
use \OCP\AppFramework\Http;
|
||||
use \OCA\Files_external\NotFoundException;
|
||||
use \OCA\Files_External\Service\BackendService;
|
||||
|
||||
class GlobalStoragesControllerTest extends StoragesControllerTest {
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->service = $this->getMockBuilder('\OCA\Files_external\Service\GlobalStoragesService')
|
||||
$this->service = $this->getMockBuilder('\OCA\Files_External\Service\GlobalStoragesService')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
|
@ -19,12 +19,12 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*/
|
||||
namespace OCA\Files_external\Tests\Controller;
|
||||
namespace OCA\Files_External\Tests\Controller;
|
||||
|
||||
use \OCP\AppFramework\Http;
|
||||
|
||||
use \OCA\Files_external\Controller\GlobalStoragesController;
|
||||
use \OCA\Files_external\Service\GlobalStoragesService;
|
||||
use \OCA\Files_External\Controller\GlobalStoragesController;
|
||||
use \OCA\Files_External\Service\GlobalStoragesService;
|
||||
use \OCA\Files_external\Lib\StorageConfig;
|
||||
use \OCA\Files_external\NotFoundException;
|
||||
|
|
@ -20,13 +20,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*/
|
||||
namespace OCA\Files_external\Tests\Controller;
|
||||
namespace OCA\Files_External\Tests\Controller;
|
||||
|
||||
use \OCA\Files_external\Controller\UserStoragesController;
|
||||
use \OCA\Files_external\Service\UserStoragesService;
|
||||
use \OCA\Files_External\Controller\UserStoragesController;
|
||||
use \OCP\AppFramework\Http;
|
||||
use \OCA\Files_external\NotFoundException;
|
||||
use \OCA\Files_External\Lib\StorageConfig;
|
||||
use \OCA\Files_External\Service\BackendService;
|
||||
|
||||
class UserStoragesControllerTest extends StoragesControllerTest {
|
||||
|
@ -38,7 +35,7 @@ class UserStoragesControllerTest extends StoragesControllerTest {
|
|||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->service = $this->getMockBuilder('\OCA\Files_external\Service\UserStoragesService')
|
||||
$this->service = $this->getMockBuilder('\OCA\Files_External\Service\UserStoragesService')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
|
@ -20,13 +20,11 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*/
|
||||
namespace OCA\Files_external\Tests\Service;
|
||||
namespace OCA\Files_External\Tests\Service;
|
||||
|
||||
use \OC\Files\Filesystem;
|
||||
|
||||
use \OCA\Files_external\Service\GlobalStoragesService;
|
||||
use \OCA\Files_external\NotFoundException;
|
||||
use \OCA\Files_external\Lib\StorageConfig;
|
||||
use \OCA\Files_External\Service\GlobalStoragesService;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
|
@ -449,8 +447,8 @@ class GlobalStoragesServiceTest extends StoragesServiceTest {
|
|||
$storage->setApplicableGroups($sourceApplicableGroups);
|
||||
$storage = $this->service->addStorage($storage);
|
||||
|
||||
$storage->setapplicableUsers($updatedApplicableUsers);
|
||||
$storage->setapplicableGroups($updatedApplicableGroups);
|
||||
$storage->setApplicableUsers($updatedApplicableUsers);
|
||||
$storage->setApplicableGroups($updatedApplicableGroups);
|
||||
|
||||
// reset calls
|
||||
self::$hookCalls = [];
|
|
@ -20,7 +20,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*/
|
||||
namespace OCA\Files_external\Tests\Service;
|
||||
namespace OCA\Files_External\Tests\Service;
|
||||
|
||||
use \OC\Files\Filesystem;
|
||||
|
||||
|
@ -28,7 +28,7 @@ use \OCA\Files_external\NotFoundException;
|
|||
use \OCA\Files_external\Lib\StorageConfig;
|
||||
use OCA\Files_External\Service\BackendService;
|
||||
use OCA\Files_External\Service\DBConfigService;
|
||||
use OCA\Files_external\Service\StoragesService;
|
||||
use OCA\Files_External\Service\StoragesService;
|
||||
|
||||
class CleaningDBConfig extends DBConfigService {
|
||||
private $mountIds = [];
|
|
@ -23,11 +23,8 @@
|
|||
namespace OCA\Files_External\Tests\Service;
|
||||
|
||||
use OCA\Files_external\NotFoundException;
|
||||
use OCA\Files_external\Service\StoragesService;
|
||||
use \OCA\Files_External\Service\UserGlobalStoragesService;
|
||||
use \OCP\IGroupManager;
|
||||
|
||||
use \OCA\Files_External\Lib\StorageConfig;
|
||||
use OCA\Files_External\Service\StoragesService;
|
||||
use OCA\Files_External\Service\UserGlobalStoragesService;
|
||||
use OCP\IUser;
|
||||
use Test\Traits\UserTrait;
|
||||
|
|
@ -20,14 +20,13 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*/
|
||||
namespace OCA\Files_external\Tests\Service;
|
||||
namespace OCA\Files_External\Tests\Service;
|
||||
|
||||
use \OC\Files\Filesystem;
|
||||
|
||||
use OCA\Files_external\Service\GlobalStoragesService;
|
||||
use OCA\Files_external\Service\StoragesService;
|
||||
use \OCA\Files_external\Service\UserStoragesService;
|
||||
use \OCA\Files_external\NotFoundException;
|
||||
use OCA\Files_External\Service\GlobalStoragesService;
|
||||
use OCA\Files_External\Service\StoragesService;
|
||||
use OCA\Files_External\Service\UserStoragesService;
|
||||
use \OCA\Files_external\Lib\StorageConfig;
|
||||
use Test\Traits\UserTrait;
|
||||
|
Loading…
Reference in a new issue