You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud-server/tests/lib/Files/Storage/CopyDirectoryTest.php

40 lines
892 B

11 years ago
<?php
11 years ago
/**
* SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
11 years ago
*/
namespace Test\Files\Storage;
use OC\Files\Storage\PolyFill\CopyDirectory;
11 years ago
use OC\Files\Storage\Temporary;
class StorageNoRecursiveCopy extends Temporary {
public function copy(string $source, string $target): bool {
if ($this->is_dir($source)) {
11 years ago
return false;
}
return copy($this->getSourcePath($source), $this->getSourcePath($target));
11 years ago
}
}
class CopyDirectoryStorage extends StorageNoRecursiveCopy {
use CopyDirectory;
11 years ago
}
/**
* Class CopyDirectoryTest
*
*
* @package Test\Files\Storage
*/
#[\PHPUnit\Framework\Attributes\Group('DB')]
class CopyDirectoryTest extends Storage {
protected function setUp(): void {
11 years ago
parent::setUp();
$this->instance = new CopyDirectoryStorage([]);
}
}