mirror of
https://github.com/nextcloud/server.git
synced 2025-01-31 06:43:12 +00:00
1580c8612b
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
34 lines
794 B
PHP
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');
|
|
}
|
|
}
|