mirror of
https://github.com/nextcloud/server.git
synced 2025-01-16 16:19:00 +00:00
49dd79eabb
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
33 lines
963 B
PHP
33 lines
963 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;
|
|
|
|
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 {
|
|
\OC_Helper::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'));
|
|
}
|
|
}
|