0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-05-17 19:52:39 +00:00
nextcloud_server/apps/files_sharing/tests/EncryptedSizePropagationTest.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.1 KiB
PHP
Raw Permalink Normal View History

<?php
/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
2016-05-17 11:42:03 +02:00
namespace OCA\Files_Sharing\Tests;
use OC\Files\View;
use OCP\ITempManager;
use OCP\Server;
use Test\Traits\EncryptionTrait;
/**
* @group DB
*/
2016-05-17 11:42:03 +02:00
class EncryptedSizePropagationTest extends SizePropagationTest {
use EncryptionTrait;
protected function setUp(): void {
parent::setUp();
$this->config->setAppValue('encryption', 'useMasterKey', '0');
}
protected function setupUser($name, $password = '') {
$this->createUser($name, $password);
$tmpFolder = Server::get(ITempManager::class)->getTemporaryFolder();
$this->registerMount($name, '\OC\Files\Storage\Local', '/' . $name, ['datadir' => $tmpFolder]);
$this->setupForUser($name, $password);
$this->loginWithEncryption($name);
return new View('/' . $name . '/files');
}
protected function loginHelper($user, $create = false, $password = false) {
$this->setupForUser($user, $password);
parent::loginHelper($user, $create, $password);
}
}