Fix tests

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2019-11-14 08:05:44 +01:00
parent 0bf6fcd6cd
commit 5cb11ca642
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
8 changed files with 26 additions and 21 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -49,7 +49,6 @@ use OCP\AppFramework\Utility\IControllerMethodReflector;
use OCP\Defaults;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\ICloudIdManager;
use OCP\IContainer;
use OCP\Files\Config\IMountProviderCollection;
use OCP\IContainer;
use OCP\IGroup;

View File

@ -71,9 +71,8 @@ abstract class TestCase extends \Test\TestCase {
public static function setUpBeforeClass(): void {
parent::setUpBeforeClass();
$application = new Application();
$application->registerMountProviders();
new Application();
// reset backend
\OC_User::clearBackends();
\OC::$server->getGroupManager()->clearBackends();

View File

@ -28,6 +28,7 @@
*/
use OCA\Files_Trashbin\Tests;
use OCA\Files_Sharing\AppInfo\Application;
/**
* Class Test_Encryption
@ -67,8 +68,9 @@ class TrashbinTest extends \Test\TestCase {
// clear share hooks
\OC_Hook::clear('OCP\\Share');
\OC::registerShareHooks();
$application = \OC::$server->query(\OCA\Files_Sharing\AppInfo\Application::class);
$application->registerMountProviders();
// init files sharing
new Application();
//disable encryption
\OC::$server->getAppManager()->disableApp('encryption');

View File

@ -60,7 +60,6 @@ class VersioningTest extends \Test\TestCase {
parent::setUpBeforeClass();
$application = new \OCA\Files_Sharing\AppInfo\Application();
$application->registerMountProviders();
// create test user
self::loginHelper(self::TEST_VERSIONS_USER2, true);

View File

@ -53,10 +53,14 @@ module.exports = function(config) {
// only test these files, others are not ready and mess
// up with the global namespace/classes/state
'apps/files_sharing/js/app.js',
'apps/files_sharing/js/sharedfilelist.js',
'apps/files_sharing/js/dist/additionalScripts.js',
'apps/files_sharing/js/public.js',
'apps/files_sharing/js/dist/files_sharing_tab.js',
'apps/files_sharing/js/dist/files_sharing.js',
'apps/files_sharing/js/dist/main.js',
'apps/files_sharing/js/dist/sidebar.js',
'apps/files_sharing/js/files_drop.js',
'apps/files_sharing/js/public.js',
'apps/files_sharing/js/sharedfilelist.js',
'apps/files_sharing/js/templates.js',
],
testFiles: ['apps/files_sharing/tests/js/*.js']

View File

@ -10,6 +10,7 @@ namespace Test\Files;
use OC\Files\Filesystem;
use OCP\Share;
use OCA\Files_Sharing\AppInfo\Application;
/**
* Class EtagTest
@ -32,8 +33,9 @@ class EtagTest extends \Test\TestCase {
parent::setUp();
\OC_Hook::clear('OC_Filesystem', 'setup');
$application = new \OCA\Files_Sharing\AppInfo\Application();
$application->registerMountProviders();
// init files sharing
new Application();
\OC\Share\Share::registerBackend('file', 'OCA\Files_Sharing\ShareBackend\File');
\OC\Share\Share::registerBackend('folder', 'OCA\Files_Sharing\ShareBackend\Folder', 'file');