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