0
0
mirror of https://github.com/nextcloud/server.git synced 2024-09-28 07:18:42 +00:00
nextcloud_server/tests/lib/Files/Storage/Wrapper/WrapperTest.php
Christoph Wurst 49dd79eabb
refactor: Add void return type to PHPUnit test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 22:32:31 +02:00

34 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'));
}
}