Merge pull request #24619 from owncloud/files_external-psr4

Move files_external to PSR-4
This commit is contained in:
Vincent Petry 2016-05-24 11:54:12 +02:00
commit c60ef7deb8
120 changed files with 118 additions and 182 deletions

View File

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

View File

@ -19,6 +19,8 @@
</types>
<ocsid>166048</ocsid>
<namespace>Files_External</namespace>
<dependencies>
<owncloud min-version="9.1" max-version="9.1" />
</dependencies>

View File

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

View File

@ -26,8 +26,6 @@
*
*/
namespace OCA\Files_External\AppInfo;
/**
* @var $this \OCP\Route\IRouter
**/

View File

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

View File

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

View File

@ -22,14 +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\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
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;

View File

@ -22,9 +22,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\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\GlobalStoragesService;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Helper\TableHelper;

View File

@ -27,21 +27,16 @@ use OC\User\NoUserException;
use OCA\Files_External\Lib\Auth\AuthMechanism;
use OCA\Files_External\Lib\Backend\Backend;
use OCA\Files_External\Lib\DefinitionParameter;
use OCA\Files_external\Lib\StorageConfig;
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 {

View File

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

View File

@ -23,21 +23,17 @@ namespace OCA\Files_External\Command;
use OC\Core\Command\Base;
use OC\User\NoUserException;
use OCA\Files_external\Lib\StorageConfig;
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 {

View File

@ -23,12 +23,11 @@ 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\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\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;

View File

@ -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 OCA\Files_External\Lib\StorageConfig;
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 {

View File

@ -25,13 +25,10 @@ use OC\Core\Command\Base;
use OCA\Files_External\Lib\Auth\AuthMechanism;
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\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
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;

View File

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

View File

@ -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\NotFoundException;
use \OCA\Files_external\Lib\StorageConfig;
use \OCA\Files_External\Service\BackendService;
use OCA\Files_External\Service\GlobalStoragesService;
use OCA\Files_External\NotFoundException;
/**
* Global storages controller

View File

@ -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\NotFoundException;
use \OCA\Files_external\Lib\StorageConfig;
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

View File

@ -30,9 +30,9 @@ 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\NotFoundException;
use \OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\Service\UserGlobalStoragesService;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use \OCA\Files_External\Lib\Backend\Backend;
use OCP\IUserSession;

View File

@ -25,19 +25,15 @@ 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\NotFoundException;
use \OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\Service\UserStoragesService;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use \OCA\Files_External\Lib\Backend\Backend;
/**

View File

@ -22,8 +22,6 @@
namespace OCA\Files_External\Lib\Auth;
use \OCP\IL10N;
use \OCA\Files_External\Lib\Auth\AuthMechanism;
use \OCA\Files_external\Lib\StorageConfig;
/**
* Builtin authentication mechanism, for legacy backends

View File

@ -22,8 +22,6 @@
namespace OCA\Files_External\Lib\Auth;
use \OCP\IL10N;
use \OCA\Files_External\Lib\Auth\AuthMechanism;
use \OCA\Files_external\Lib\StorageConfig;
/**
* Null authentication mechanism

View File

@ -23,7 +23,7 @@
*
*/
namespace OCA\Files_external\Lib;
namespace OCA\Files_External\Lib;
use OCA\Files_External\Lib\Auth\IUserProvided;
use \OCA\Files_External\Lib\Backend\Backend;

View File

@ -19,7 +19,7 @@
*
*/
namespace OCA\Files_external\Migration;
namespace OCA\Files_External\Migration;
use OCP\IUser;
use OCP\IUserSession;

View File

@ -20,22 +20,21 @@
*
*/
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\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 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

View File

@ -19,7 +19,7 @@
*
*/
namespace OCA\Files_external;
namespace OCA\Files_External;
/**
* Storage is not found

View File

@ -19,7 +19,7 @@
*
*/
namespace OCA\Files_external\Service;
namespace OCA\Files_External\Service;
/**
* Read admin defined mounts from the legacy mount.json

View File

@ -22,13 +22,11 @@
*
*/
namespace OCA\Files_external\Service;
namespace OCA\Files_External\Service;
use \OCP\IUserSession;
use \OC\Files\Filesystem;
use \OCA\Files_external\Lib\StorageConfig;
use \OCA\Files_external\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
/**
* Service class to manage global external storages

View File

@ -19,7 +19,7 @@
*
*/
namespace OCA\Files_external\Service;
namespace OCA\Files_External\Service;
class ImportLegacyStoragesService extends LegacyStoragesService {
private $data;

View File

@ -19,9 +19,9 @@
*
*/
namespace OCA\Files_external\Service;
namespace OCA\Files_External\Service;
use \OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\Lib\StorageConfig;
/**
* Read mount config from legacy mount.json

View File

@ -23,11 +23,11 @@
*
*/
namespace OCA\Files_external\Service;
namespace OCA\Files_External\Service;
use \OC\Files\Filesystem;
use \OCA\Files_external\Lib\StorageConfig;
use \OCA\Files_external\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use \OCA\Files_External\Lib\Backend\Backend;
use \OCA\Files_External\Lib\Auth\AuthMechanism;
use OCP\Files\Config\IUserMountCache;

View File

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

View File

@ -19,7 +19,7 @@
*
*/
namespace OCA\Files_external\Service;
namespace OCA\Files_External\Service;
use OCP\IUserSession;

View File

@ -21,14 +21,14 @@
*
*/
namespace OCA\Files_external\Service;
namespace OCA\Files_External\Service;
use OCP\Files\Config\IUserMountCache;
use \OCP\IUserSession;
use \OC\Files\Filesystem;
use \OCA\Files_external\Lib\StorageConfig;
use \OCA\Files_external\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use \OCA\Files_External\Service\BackendService;
use \OCA\Files_External\Service\UserTrait;

View File

@ -33,7 +33,7 @@
*/
use phpseclib\Crypt\AES;
use \OCA\Files_External\Appinfo\Application;
use \OCA\Files_External\AppInfo\Application;
use \OCA\Files_External\Lib\Backend\LegacyBackend;
use \OCA\Files_External\Lib\StorageConfig;
use \OCA\Files_External\Lib\Backend\Backend;
@ -91,7 +91,7 @@ class OC_Mount_Config {
$userStoragesService->setUser($user);
foreach ($userGlobalStoragesService->getStorages() as $storage) {
/** @var \OCA\Files_external\Lib\StorageConfig $storage */
/** @var \OCA\Files_External\Lib\StorageConfig $storage */
$mountPoint = '/'.$uid.'/files'.$storage->getMountPoint();
$mountEntry = self::prepareMountPointEntry($storage, false);
foreach ($mountEntry['options'] as &$option) {

View File

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

View File

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

View File

@ -35,7 +35,7 @@ use OCA\Files_External\Lib\Storage\AmazonS3;
*
* @package OCA\Files_External\Tests
*/
class AmazonS3Migration extends \Test\TestCase {
class AmazonS3MigrationTest extends \Test\TestCase {
/**
* @var \OC\Files\Storage\Storage instance

View File

@ -21,8 +21,8 @@
namespace OCA\Files_External\Tests\Command;
use OCA\Files_external\Lib\StorageConfig;
use OCA\Files_external\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\Input;
@ -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();

View File

@ -26,7 +26,7 @@ use OCA\Files_External\Lib\Auth\NullMechanism;
use OCA\Files_External\Lib\Auth\Password\Password;
use OCA\Files_External\Lib\Auth\Password\SessionCredentials;
use OCA\Files_External\Lib\Backend\Local;
use OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\Lib\StorageConfig;
use Symfony\Component\Console\Output\BufferedOutput;
class ListCommandTest extends CommandTest {
@ -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 */

View File

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

View File

@ -19,14 +19,14 @@
* 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\Lib\StorageConfig;
use \OCA\Files_external\NotFoundException;
use \OCA\Files_External\Controller\GlobalStoragesController;
use \OCA\Files_External\Service\GlobalStoragesService;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
abstract class StoragesControllerTest extends \Test\TestCase {

View File

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

Some files were not shown because too many files have changed in this diff Show More