EncryptedSizePropagationTest.php 832 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OCA\Files_Sharing\Tests;
  8. use OC\Files\View;
  9. use Test\Traits\EncryptionTrait;
  10. /**
  11. * @group DB
  12. */
  13. class EncryptedSizePropagationTest extends SizePropagationTest {
  14. use EncryptionTrait;
  15. protected function setupUser($name, $password = '') {
  16. $this->createUser($name, $password);
  17. $tmpFolder = \OC::$server->getTempManager()->getTemporaryFolder();
  18. $this->registerMount($name, '\OC\Files\Storage\Local', '/' . $name, ['datadir' => $tmpFolder]);
  19. $this->config->setAppValue('encryption', 'useMasterKey', '0');
  20. $this->setupForUser($name, $password);
  21. $this->loginWithEncryption($name);
  22. return new View('/' . $name . '/files');
  23. }
  24. }