0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-01-31 06:43:12 +00:00
nextcloud_server/apps/files_sharing/tests/HelperTest.php
Côme Chilliet 1580c8612b
chore(apps): Apply new rector configuration to autouse classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-15 10:40:25 +02:00

34 lines
794 B
PHP

<?php
/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OCA\Files_Sharing\Tests;
use OC\Files\Filesystem;
use OCA\Files_Sharing\Helper;
/**
* Class HelperTest
*
* @group DB
*/
class HelperTest extends TestCase {
/**
* test set and get share folder
*/
public function testSetGetShareFolder(): void {
$this->assertSame('/', Helper::getShareFolder());
Helper::setShareFolder('/Shared/Folder');
$sharedFolder = Helper::getShareFolder();
$this->assertSame('/Shared/Folder', Helper::getShareFolder());
$this->assertTrue(Filesystem::is_dir($sharedFolder));
// cleanup
\OC::$server->getConfig()->deleteSystemValue('share_folder');
}
}