0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-05-20 21:20:14 +00:00
nextcloud_server/tests/lib/Files/Storage/Wrapper/WrapperTest.php
Ferdinand Thiessen 494a079321
test: replace OC_Helper:rmdirr with OCP\Files::rmdirr
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-16 23:09:37 +02:00

35 lines
974 B
PHP

<?php
/**
* SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\Files\Storage\Wrapper;
use OCP\Files;
class WrapperTest extends \Test\Files\Storage\Storage {
/**
* @var string tmpDir
*/
private $tmpDir;
protected function setUp(): void {
parent::setUp();
$this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
$storage = new \OC\Files\Storage\Local(['datadir' => $this->tmpDir]);
$this->instance = new \OC\Files\Storage\Wrapper\Wrapper(['storage' => $storage]);
}
protected function tearDown(): void {
Files::rmdirr($this->tmpDir);
parent::tearDown();
}
public function testInstanceOfStorageWrapper(): void {
$this->assertTrue($this->instance->instanceOfStorage('\OC\Files\Storage\Local'));
$this->assertTrue($this->instance->instanceOfStorage('\OC\Files\Storage\Wrapper\Wrapper'));
}
}