diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-07-10 00:39:58 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-07-10 01:02:59 +0300 |
commit | 065ef14cb025f6664c7a3ed1aa89d333a2944342 (patch) | |
tree | 72cba2059ca302ffa3fdfa2a1e5a9ffc604285d0 /apps/files_external/tests | |
parent | e18e4511d0988fd1133f0bfc553f38e5a29a4565 (diff) |
Move OC_Mount_Config to proper classname and remove OC::$CLASSPATH usage in files_external
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_external/tests')
5 files changed, 49 insertions, 49 deletions
diff --git a/apps/files_external/tests/Controller/StoragesControllerTest.php b/apps/files_external/tests/Controller/StoragesControllerTest.php index 617ad11c459..7572da25752 100644 --- a/apps/files_external/tests/Controller/StoragesControllerTest.php +++ b/apps/files_external/tests/Controller/StoragesControllerTest.php @@ -50,11 +50,11 @@ abstract class StoragesControllerTest extends \Test\TestCase { protected $service; protected function setUp(): void { - \OC_Mount_Config::$skipTest = true; + \OCA\Files_External\MountConfig::$skipTest = true; } protected function tearDown(): void { - \OC_Mount_Config::$skipTest = false; + \OCA\Files_External\MountConfig::$skipTest = false; } /** diff --git a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php index afbece9241a..d08b8079d12 100644 --- a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php @@ -202,7 +202,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { [ [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'all' ], ], @@ -215,7 +215,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { [ [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user1', ], ], @@ -228,7 +228,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { [ [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group1', ], ], @@ -240,12 +240,12 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { [ [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user1', ], [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user2', ], ], @@ -258,12 +258,12 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { [ [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group1' ], [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group2' ], ], @@ -276,22 +276,22 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { [ [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user1', ], [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user2', ], [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group1' ], [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group2' ], ], @@ -334,27 +334,27 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { // delete the "all entry" [ Filesystem::signal_delete_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'all', ], [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user1', ], [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user2', ], [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group1' ], [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group2' ], ], @@ -369,12 +369,12 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { [ [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user2', ], [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group2' ], ], @@ -389,12 +389,12 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { [ [ Filesystem::signal_delete_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user2', ], [ Filesystem::signal_delete_mount, - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group2' ], ], @@ -409,18 +409,18 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { [ [ Filesystem::signal_delete_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user1', ], [ Filesystem::signal_delete_mount, - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group1' ], // create the "all" entry [ Filesystem::signal_create_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'all' ], ], @@ -472,7 +472,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { } } - + public function testHooksRenameMountPoint() { $storage = $this->makeTestStorageData(); $storage->setApplicableUsers(['user1', 'user2']); @@ -491,50 +491,50 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { [ Filesystem::signal_delete_mount, '/mountpoint', - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user1', ], [ Filesystem::signal_delete_mount, '/mountpoint', - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user2', ], [ Filesystem::signal_delete_mount, '/mountpoint', - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group1', ], [ Filesystem::signal_delete_mount, '/mountpoint', - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group2', ], // creates new one [ Filesystem::signal_create_mount, '/renamedMountpoint', - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user1', ], [ Filesystem::signal_create_mount, '/renamedMountpoint', - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user2', ], [ Filesystem::signal_create_mount, '/renamedMountpoint', - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group1', ], [ Filesystem::signal_create_mount, '/renamedMountpoint', - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group2', ], ]; @@ -561,22 +561,22 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { [ [ Filesystem::signal_delete_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user1', ], [ Filesystem::signal_delete_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'user2', ], [ Filesystem::signal_delete_mount, - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group1' ], [ Filesystem::signal_delete_mount, - \OC_Mount_Config::MOUNT_TYPE_GROUP, + \OCA\Files_External\MountConfig::MOUNT_TYPE_GROUP, 'group2' ], ], @@ -588,7 +588,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { [ [ Filesystem::signal_delete_mount, - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, 'all', ], ], diff --git a/apps/files_external/tests/Service/StoragesServiceTest.php b/apps/files_external/tests/Service/StoragesServiceTest.php index 049c0a2989e..76f0a09c14b 100644 --- a/apps/files_external/tests/Service/StoragesServiceTest.php +++ b/apps/files_external/tests/Service/StoragesServiceTest.php @@ -102,7 +102,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { 'datadirectory', \OC::$SERVERROOT . '/data/' ); - \OC_Mount_Config::$skipTest = true; + \OCA\Files_External\MountConfig::$skipTest = true; $this->mountCache = $this->createMock(IUserMountCache::class); @@ -169,15 +169,15 @@ abstract class StoragesServiceTest extends \Test\TestCase { } }); - \OC_Mount_Config::$app = $this->getMockBuilder('\OCA\Files_External\Appinfo\Application') + \OCA\Files_External\MountConfig::$app = $this->getMockBuilder('\OCA\Files_External\Appinfo\Application') ->disableOriginalConstructor() ->getMock(); - \OC_Mount_Config::$app->method('getContainer') + \OCA\Files_External\MountConfig::$app->method('getContainer') ->willReturn($containerMock); } protected function tearDown(): void { - \OC_Mount_Config::$skipTest = false; + \OCA\Files_External\MountConfig::$skipTest = false; self::$hookCalls = []; if ($this->dbConfig) { $this->dbConfig->clean(); diff --git a/apps/files_external/tests/Service/UserStoragesServiceTest.php b/apps/files_external/tests/Service/UserStoragesServiceTest.php index 7d177f76904..9dd4a570c33 100644 --- a/apps/files_external/tests/Service/UserStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserStoragesServiceTest.php @@ -106,7 +106,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { current(self::$hookCalls), Filesystem::signal_create_mount, $storage->getMountPoint(), - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, $this->userId ); @@ -157,7 +157,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { self::$hookCalls[1], Filesystem::signal_delete_mount, '/mountpoint', - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, $this->userId ); } @@ -178,19 +178,19 @@ class UserStoragesServiceTest extends StoragesServiceTest { self::$hookCalls[0], Filesystem::signal_delete_mount, '/mountpoint', - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, $this->userId ); $this->assertHookCall( self::$hookCalls[1], Filesystem::signal_create_mount, '/renamedMountpoint', - \OC_Mount_Config::MOUNT_TYPE_USER, + \OCA\Files_External\MountConfig::MOUNT_TYPE_USER, $this->userId ); } - + public function testGetAdminStorage() { $this->expectException(\OCA\Files_External\NotFoundException::class); diff --git a/apps/files_external/tests/Settings/AdminTest.php b/apps/files_external/tests/Settings/AdminTest.php index 8edca14f3b1..f8d6bce1d62 100644 --- a/apps/files_external/tests/Settings/AdminTest.php +++ b/apps/files_external/tests/Settings/AdminTest.php @@ -95,7 +95,7 @@ class AdminTest extends TestCase { 'storages' => ['a', 'b', 'c'], 'backends' => ['d', 'e', 'f'], 'authMechanisms' => ['g', 'h', 'i'], - 'dependencies' => \OC_Mount_Config::dependencyMessage($this->backendService->getBackends()), + 'dependencies' => \OCA\Files_External\MountConfig::dependencyMessage($this->backendService->getBackends()), 'allowUserMounting' => true, 'globalCredentials' => 'asdf:asdf', 'globalCredentialsUid' => '', |