mirror of
https://github.com/nextcloud/server.git
synced 2025-12-18 15:56:14 -05:00
refactor: apply rector rules for PHPUnit 10
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
8f74228147
commit
d6d6747a73
293 changed files with 350 additions and 581 deletions
|
|
@ -24,10 +24,9 @@ use Test\TestCase;
|
|||
/**
|
||||
* Class ApplicationTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Comments\Tests\Unit\AppInfo
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ApplicationTest extends TestCase {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ use Sabre\VObject\Component\VCard;
|
|||
use Sabre\VObject\UUIDUtil;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class RecentContactMapperTest extends TestCase {
|
||||
private RecentContactMapper $recentContactMapper;
|
||||
private ITimeFactory $time;
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ class Directory extends Node implements \Sabre\DAV\ICollection, \Sabre\DAV\IQuot
|
|||
}
|
||||
|
||||
if ($info->getMimeType() === FileInfo::MIMETYPE_FOLDER) {
|
||||
$node = new \OCA\DAV\Connector\Sabre\Directory($this->fileView, $info, $this->tree, $this->shareManager);
|
||||
$node = new Directory($this->fileView, $info, $this->tree, $this->shareManager);
|
||||
} else {
|
||||
// In case reading a directory was allowed but it turns out the node was a not a directory, reject it now.
|
||||
if (!$this->info->isReadable()) {
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ use OCP\ISession;
|
|||
use OCP\ITagManager;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\IUserSession;
|
||||
use OCP\Mail\IEmailValidator;
|
||||
use OCP\Mail\IMailer;
|
||||
use OCP\Profiler\IProfiler;
|
||||
use OCP\SabrePluginEvent;
|
||||
|
|
@ -351,7 +352,7 @@ class Server {
|
|||
\OCP\Server::get(IMipService::class),
|
||||
\OCP\Server::get(EventComparisonService::class),
|
||||
\OCP\Server::get(\OCP\Mail\Provider\IManager::class),
|
||||
\OCP\Server::get(\OCP\Mail\IEmailValidator::class),
|
||||
\OCP\Server::get(IEmailValidator::class),
|
||||
));
|
||||
}
|
||||
$this->server->addPlugin(new \OCA\DAV\CalDAV\Search\SearchPlugin());
|
||||
|
|
|
|||
|
|
@ -28,9 +28,7 @@ use PHPUnit\Framework\MockObject\MockObject;
|
|||
use Psr\Log\LoggerInterface;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class CalDavSharingBackendTest extends TestCase {
|
||||
|
||||
private IDBConnection $db;
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@ use OCP\IDBConnection;
|
|||
use OCP\Server;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class SharingMapperTest extends TestCase {
|
||||
|
||||
private SharingMapper $mapper;
|
||||
|
|
|
|||
|
|
@ -13,9 +13,7 @@ use OCA\DAV\Db\PropertyMapper;
|
|||
use OCP\Server;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class PropertyMapperTest extends TestCase {
|
||||
|
||||
/** @var PropertyMapper */
|
||||
|
|
|
|||
|
|
@ -22,9 +22,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||
use Test\TestCase;
|
||||
use function scandir;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class CalendarMigratorTest extends TestCase {
|
||||
|
||||
private IUserManager $userManager;
|
||||
|
|
|
|||
|
|
@ -22,9 +22,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||
use Test\TestCase;
|
||||
use function scandir;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ContactsMigratorTest extends TestCase {
|
||||
|
||||
private IUserManager $userManager;
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ use Test\TestCase;
|
|||
/**
|
||||
* Class ApplicationTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\Unit\AppInfo
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ApplicationTest extends TestCase {
|
||||
public function test(): void {
|
||||
$app = new Application();
|
||||
|
|
|
|||
|
|
@ -25,9 +25,7 @@ use PHPUnit\Framework\MockObject\MockObject;
|
|||
use Psr\Log\LoggerInterface;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class UserStatusAutomationTest extends TestCase {
|
||||
protected ITimeFactory&MockObject $time;
|
||||
protected IJobList&MockObject $jobList;
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ use Test\TestCase;
|
|||
/**
|
||||
* Class CalDavBackendTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\unit\CalDAV
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
abstract class AbstractCalDavBackend extends TestCase {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,9 +13,7 @@ use OCP\Activity\IFilter;
|
|||
use OCP\Server;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class GenericTest extends TestCase {
|
||||
public static function dataFilters(): array {
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -28,9 +28,8 @@ use function time;
|
|||
|
||||
/**
|
||||
* Class CalDavBackendTest
|
||||
*
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class CalDavBackendTest extends AbstractCalDavBackend {
|
||||
public function testCalendarOperations(): void {
|
||||
$calendarId = $this->createTestCalendar();
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ use Test\TestCase;
|
|||
/**
|
||||
* Class PublicCalendarRootTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\unit\CalDAV
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class PublicCalendarRootTest extends TestCase {
|
||||
public const UNIT_TEST_USER = '';
|
||||
private CalDavBackend $backend;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ use OCA\DAV\Capabilities;
|
|||
use OCP\AppFramework\QueryException;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class NotificationProviderManagerTest extends TestCase {
|
||||
private NotificationProviderManager $providerManager;
|
||||
|
||||
|
|
|
|||
|
|
@ -43,10 +43,10 @@ use function time;
|
|||
/**
|
||||
* Class CardDavBackendTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\unit\CardDAV
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class CardDavBackendTest extends TestCase {
|
||||
private Principal&MockObject $principal;
|
||||
private IUserManager&MockObject $userManager;
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ use Test\TestCase;
|
|||
* Class RemoveInvalidSharesTest
|
||||
*
|
||||
* @package OCA\DAV\Tests\Unit\Repair
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class RemoveInvalidSharesTest extends TestCase {
|
||||
private RemoveInvalidShares $command;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ use PHPUnit\Framework\MockObject\MockObject;
|
|||
/**
|
||||
* Class LegacyPublicAuthTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\unit\Connector
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class LegacyPublicAuthTest extends \Test\TestCase {
|
||||
private ISession&MockObject $session;
|
||||
private IRequest&MockObject $request;
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ use Test\TestCase;
|
|||
* Class AuthTest
|
||||
*
|
||||
* @package OCA\DAV\Tests\unit\Connector\Sabre
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class AuthTest extends TestCase {
|
||||
private ISession&MockObject $session;
|
||||
private Session&MockObject $userSession;
|
||||
|
|
|
|||
|
|
@ -19,9 +19,7 @@ use Sabre\HTTP\RequestInterface;
|
|||
use Sabre\HTTP\ResponseInterface;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class BearerAuthTest extends TestCase {
|
||||
private IUserSession&MockObject $userSession;
|
||||
private ISession&MockObject $session;
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ use Sabre\DAV\Tree;
|
|||
/**
|
||||
* Class CustomPropertiesBackend
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\unit\Connector\Sabre
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class CustomPropertiesBackendTest extends \Test\TestCase {
|
||||
private \Sabre\DAV\Server $server;
|
||||
private \Sabre\DAV\Tree&MockObject $tree;
|
||||
|
|
|
|||
|
|
@ -55,9 +55,7 @@ class TestViewDirectory extends View {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class DirectoryTest extends \Test\TestCase {
|
||||
use UserTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ use Test\Traits\UserTrait;
|
|||
/**
|
||||
* Class File
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\unit\Connector\Sabre
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class FileTest extends TestCase {
|
||||
use MountProviderTrait;
|
||||
use UserTrait;
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@ use Sabre\HTTP\ResponseInterface;
|
|||
use Sabre\Xml\Service;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class FilesPluginTest extends TestCase {
|
||||
|
||||
private Tree&MockObject $tree;
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ use PHPUnit\Framework\MockObject\MockObject;
|
|||
/**
|
||||
* Class NodeTest
|
||||
*
|
||||
* @group DB
|
||||
* @package OCA\DAV\Tests\unit\Connector\Sabre
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class NodeTest extends \Test\TestCase {
|
||||
public static function davPermissionsProvider(): array {
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ use OCP\Files\Mount\IMountManager;
|
|||
/**
|
||||
* Class ObjectTreeTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\Unit\Connector\Sabre
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ObjectTreeTest extends \Test\TestCase {
|
||||
public static function copyDataProvider(): array {
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ use Psr\Log\LoggerInterface;
|
|||
/**
|
||||
* Class PublicAuthTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\unit\Connector
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class PublicAuthTest extends \Test\TestCase {
|
||||
|
||||
private ISession&MockObject $session;
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ use OCP\Files\FileInfo;
|
|||
/**
|
||||
* Class DeleteTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\unit\Connector\Sabre\RequestTest
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class DeleteTest extends RequestTestCase {
|
||||
public function testBasicUpload(): void {
|
||||
$user = self::getUniqueID();
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ use OCP\Lock\ILockingProvider;
|
|||
/**
|
||||
* Class DownloadTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\unit\Connector\Sabre\RequestTest
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class DownloadTest extends RequestTestCase {
|
||||
public function testDownload(): void {
|
||||
$user = self::getUniqueID();
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ use Test\Traits\EncryptionTrait;
|
|||
/**
|
||||
* Class EncryptionMasterKeyUploadTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class EncryptionMasterKeyUploadTest extends UploadTest {
|
||||
use EncryptionTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ use Test\Traits\EncryptionTrait;
|
|||
/**
|
||||
* Class EncryptionUploadTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class EncryptionUploadTest extends UploadTest {
|
||||
use EncryptionTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ use OCP\Server;
|
|||
/**
|
||||
* Class PartFileInRootUploadTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\unit\Connector\Sabre\RequestTest
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class PartFileInRootUploadTest extends UploadTest {
|
||||
protected function setUp(): void {
|
||||
$config = Server::get(IConfig::class);
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ use OCP\Lock\ILockingProvider;
|
|||
/**
|
||||
* Class UploadTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\unit\Connector\Sabre\RequestTest
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class UploadTest extends RequestTestCase {
|
||||
public function testBasicUpload(): void {
|
||||
$user = self::getUniqueID();
|
||||
|
|
|
|||
|
|
@ -25,9 +25,7 @@ use Sabre\DAVACL\IACL;
|
|||
use Sabre\DAVACL\IPrincipal;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class CustomPropertiesBackendTest extends TestCase {
|
||||
private const BASE_URI = '/remote.php/dav/';
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ use Test\TestCase;
|
|||
* Class CalDAVRemoveEmptyValueTest
|
||||
*
|
||||
* @package OCA\DAV\Tests\Unit\DAV\Migration
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class CalDAVRemoveEmptyValueTest extends TestCase {
|
||||
private LoggerInterface&MockObject $logger;
|
||||
private CalDavBackend&MockObject $backend;
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ use OCP\IRequest;
|
|||
/**
|
||||
* Class ServerTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\DAV\Tests\Unit
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ServerTest extends \Test\TestCase {
|
||||
|
||||
#[\PHPUnit\Framework\Attributes\DataProvider('providesUris')]
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ use Test\Traits\UserTrait;
|
|||
/**
|
||||
* Class FixEncryptedVersionTest
|
||||
*
|
||||
* @group DB
|
||||
* @package OCA\Encryption\Tests\Command
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class FixEncryptedVersionTest extends TestCase {
|
||||
use MountProviderTrait;
|
||||
use EncryptionTrait;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||
use Test\TestCase;
|
||||
|
||||
class TestEnableMasterKey extends TestCase {
|
||||
public function __construct() {
|
||||
parent::__construct(static::class);
|
||||
}
|
||||
protected EnableMasterKey $enableMasterKey;
|
||||
protected Util&MockObject $util;
|
||||
protected IAppConfig&MockObject $config;
|
||||
|
|
|
|||
|
|
@ -306,9 +306,8 @@ class CryptTest extends TestCase {
|
|||
|
||||
/**
|
||||
* test decrypt()
|
||||
*
|
||||
* @depends testEncrypt
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Depends('testEncrypt')]
|
||||
public function testDecrypt($data): void {
|
||||
$result = self::invokePrivate(
|
||||
$this->crypt,
|
||||
|
|
|
|||
|
|
@ -23,9 +23,7 @@ class TemporaryNoEncrypted extends Temporary implements IDisableEncryptionStorag
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class EncryptedStorageTest extends TestCase {
|
||||
use MountProviderTrait;
|
||||
use EncryptionTrait;
|
||||
|
|
|
|||
|
|
@ -30,9 +30,7 @@ use OCP\User\Events\UserLoggedOutEvent;
|
|||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class UserEventsListenersTest extends TestCase {
|
||||
|
||||
protected Util&MockObject $util;
|
||||
|
|
|
|||
|
|
@ -21,9 +21,7 @@ use PHPUnit\Framework\MockObject\MockObject;
|
|||
use Psr\Log\LoggerInterface;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class PassphraseServiceTest extends TestCase {
|
||||
|
||||
protected Util&MockObject $util;
|
||||
|
|
|
|||
|
|
@ -28,17 +28,13 @@ class SessionTest extends TestCase {
|
|||
$this->instance->getPrivateKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testThatGetPrivateKeyThrowsExceptionWhenNotSet
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Depends('testThatGetPrivateKeyThrowsExceptionWhenNotSet')]
|
||||
public function testSetAndGetPrivateKey(): void {
|
||||
$this->instance->setPrivateKey('dummyPrivateKey');
|
||||
$this->assertEquals('dummyPrivateKey', $this->instance->getPrivateKey());
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testSetAndGetPrivateKey
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Depends('testSetAndGetPrivateKey')]
|
||||
public function testIsPrivateKeySet(): void {
|
||||
$this->instance->setPrivateKey('dummyPrivateKey');
|
||||
$this->assertTrue($this->instance->isPrivateKeySet());
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ use Psr\Log\LoggerInterface;
|
|||
* Class RequestHandlerTest
|
||||
*
|
||||
* @package OCA\FederatedFileSharing\Tests
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class RequestHandlerControllerTest extends \Test\TestCase {
|
||||
private string $owner = 'owner';
|
||||
private string $user1 = 'user1';
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ use Psr\Log\LoggerInterface;
|
|||
* Class FederatedShareProviderTest
|
||||
*
|
||||
* @package OCA\FederatedFileSharing\Tests
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class FederatedShareProviderTest extends \Test\TestCase {
|
||||
protected IDBConnection $connection;
|
||||
protected AddressHandler&MockObject $addressHandler;
|
||||
|
|
|
|||
|
|
@ -17,12 +17,9 @@ use OCP\IUserSession;
|
|||
use OCP\Server;
|
||||
|
||||
/**
|
||||
* Class Test_Files_Sharing_Base
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* Base class for sharing tests.
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
abstract class TestCase extends \Test\TestCase {
|
||||
public const TEST_FILES_SHARING_API_USER1 = 'test-share-user1';
|
||||
public const TEST_FILES_SHARING_API_USER2 = 'test-share-user2';
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ use OCP\IL10N;
|
|||
* Handles all database calls for the federation app
|
||||
*
|
||||
* @todo Port to QBMapper
|
||||
*
|
||||
* @group DB
|
||||
* @package OCA\Federation
|
||||
*/
|
||||
class DbHandler {
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ use Psr\Log\LoggerInterface;
|
|||
/**
|
||||
* Class GetSharedSecretTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Federation\Tests\BackgroundJob
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class GetSharedSecretTest extends TestCase {
|
||||
|
||||
private MockObject&IClient $httpClient;
|
||||
|
|
|
|||
|
|
@ -16,9 +16,7 @@ use OCP\Server;
|
|||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class DbHandlerTest extends TestCase {
|
||||
private DbHandler $dbHandler;
|
||||
private IL10N&MockObject $il10n;
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ use Test\TestCase;
|
|||
* Class GenericTest
|
||||
*
|
||||
* @package OCA\Files\Tests\Activity\Filter
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class GenericTest extends TestCase {
|
||||
public static function dataFilters(): array {
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ use Psr\Log\LoggerInterface;
|
|||
/**
|
||||
* Class DeleteOrphanedItemsJobTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package Test\BackgroundJob
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class DeleteOrphanedItemsJobTest extends \Test\TestCase {
|
||||
protected IDBConnection $connection;
|
||||
protected LoggerInterface $logger;
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ use Test\Traits\UserTrait;
|
|||
* Class ScanFilesTest
|
||||
*
|
||||
* @package OCA\Files\Tests\BackgroundJob
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ScanFilesTest extends TestCase {
|
||||
use UserTrait;
|
||||
use MountProviderTrait;
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ use Test\TestCase;
|
|||
/**
|
||||
* Class DeleteOrphanedFilesTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files\Tests\Command
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class DeleteOrphanedFilesTest extends TestCase {
|
||||
|
||||
private DeleteOrphanedFiles $command;
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ use Test\TestCase;
|
|||
/**
|
||||
* Class ViewControllerTest
|
||||
*
|
||||
* @group RoutingWeirdness
|
||||
*
|
||||
* @package OCA\Files\Tests\Controller
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('RoutingWeirdness')]
|
||||
class ViewControllerTest extends TestCase {
|
||||
private ContainerInterface&MockObject $container;
|
||||
private IAppManager&MockObject $appManager;
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ use PHPUnit\Framework\MockObject\MockObject;
|
|||
/**
|
||||
* Class TagServiceTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class TagServiceTest extends \Test\TestCase {
|
||||
private string $user;
|
||||
private IUserSession&MockObject $userSession;
|
||||
|
|
|
|||
|
|
@ -18,9 +18,7 @@ use OCP\User\Events\UserLoggedInEvent;
|
|||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class StorePasswordListenerTest extends TestCase {
|
||||
protected IUser&MockObject $mockedUser;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ use OCA\Files_External\Lib\Storage\OwnCloud;
|
|||
/**
|
||||
* Class OwnCloudFunctions
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_External\Tests
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class OwnCloudFunctionsTest extends \Test\TestCase {
|
||||
public static function configUrlProvider(): array {
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@ use OCP\Security\ICrypto;
|
|||
use OCP\Server;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class DBConfigServiceTest extends TestCase {
|
||||
private IDBConnection $connection;
|
||||
private DBConfigService $dbConfig;
|
||||
|
|
|
|||
|
|
@ -13,9 +13,7 @@ use OCA\Files_External\MountConfig;
|
|||
|
||||
use OCA\Files_External\Service\GlobalStoragesService;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class GlobalStoragesServiceTest extends StoragesServiceTestCase {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
|
|
|||
|
|
@ -53,9 +53,7 @@ class CleaningDBConfig extends DBConfigService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
abstract class StoragesServiceTestCase extends \Test\TestCase {
|
||||
protected StoragesService $service;
|
||||
protected BackendService&MockObject $backendService;
|
||||
|
|
|
|||
|
|
@ -20,9 +20,7 @@ use OCP\Server;
|
|||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Test\Traits\UserTrait;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest {
|
||||
use UserTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,9 +22,7 @@ use OCP\Server;
|
|||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Test\Traits\UserTrait;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class UserStoragesServiceTest extends StoragesServiceTestCase {
|
||||
use UserTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ use OCA\Files_External\Lib\Storage\AmazonS3;
|
|||
/**
|
||||
* Class Amazons3Test
|
||||
*
|
||||
* @group DB
|
||||
* @group S3
|
||||
*
|
||||
* @package OCA\Files_External\Tests\Storage
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
#[\PHPUnit\Framework\Attributes\Group('S3')]
|
||||
class Amazons3MultiPartTest extends \Test\Files\Storage\Storage {
|
||||
use ConfigurableStorageTrait;
|
||||
/** @var AmazonS3 */
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ use OCA\Files_External\Lib\Storage\AmazonS3;
|
|||
/**
|
||||
* Class Amazons3Test
|
||||
*
|
||||
* @group DB
|
||||
* @group S3
|
||||
*
|
||||
* @package OCA\Files_External\Tests\Storage
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
#[\PHPUnit\Framework\Attributes\Group('S3')]
|
||||
class Amazons3Test extends \Test\Files\Storage\Storage {
|
||||
use ConfigurableStorageTrait;
|
||||
/** @var AmazonS3 */
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ use OCA\Files_External\Lib\Storage\FTP;
|
|||
/**
|
||||
* Class FtpTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_External\Tests\Storage
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class FtpTest extends \Test\Files\Storage\Storage {
|
||||
use ConfigurableStorageTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ use OCA\Files_External\Lib\Storage\OwnCloud;
|
|||
/**
|
||||
* Class OwnCloudTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_External\Tests\Storage
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class OwncloudTest extends \Test\Files\Storage\Storage {
|
||||
use ConfigurableStorageTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ use OCA\Files_External\Lib\Storage\SFTP_Key;
|
|||
/**
|
||||
* Class SFTP_KeyTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_External\Tests\Storage
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class SFTP_KeyTest extends \Test\Files\Storage\Storage {
|
||||
use ConfigurableStorageTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ use OCA\Files_External\Lib\Storage\SFTP;
|
|||
/**
|
||||
* Class SftpTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_External\Tests\Storage
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class SftpTest extends \Test\Files\Storage\Storage {
|
||||
use ConfigurableStorageTrait;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ use PHPUnit\Framework\ExpectationFailedException;
|
|||
/**
|
||||
* Class SmbTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_External\Tests\Storage
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class SmbTest extends \Test\Files\Storage\Storage {
|
||||
use ConfigurableStorageTrait;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ use OCA\Files_External\Lib\Storage\Swift;
|
|||
/**
|
||||
* Class SwiftTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_External\Tests\Storage
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class SwiftTest extends \Test\Files\Storage\Storage {
|
||||
use ConfigurableStorageTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,8 @@ declare(strict_types=1);
|
|||
|
||||
namespace OCA\Files_External\Tests\Storage;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
* @group S3
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
#[\PHPUnit\Framework\Attributes\Group('S3')]
|
||||
class VersionedAmazonS3Test extends Amazons3Test {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ use OCP\Server;
|
|||
/**
|
||||
* Class WebdavTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_External\Tests\Storage
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class WebdavTest extends \Test\Files\Storage\Storage {
|
||||
use ConfigurableStorageTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -43,12 +43,11 @@ use Psr\Container\ContainerInterface;
|
|||
use Psr\Log\LoggerInterface;
|
||||
use Test\Traits\EmailValidatorTrait;
|
||||
|
||||
// TODO: convert to real integration tests
|
||||
/**
|
||||
* Class ApiTest
|
||||
*
|
||||
* @group DB
|
||||
* TODO: convert to real integration tests
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ApiTest extends TestCase {
|
||||
use EmailValidatorTrait;
|
||||
|
||||
|
|
@ -217,9 +216,7 @@ class ApiTest extends TestCase {
|
|||
$ocs->cleanup();
|
||||
}
|
||||
|
||||
/**
|
||||
* @group RoutingWeirdness
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('RoutingWeirdness')]
|
||||
public function testCreateShareLink(): void {
|
||||
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
|
||||
$result = $ocs->createShare($this->folder, Constants::PERMISSION_ALL, IShare::TYPE_LINK);
|
||||
|
|
@ -242,10 +239,8 @@ class ApiTest extends TestCase {
|
|||
$ocs->cleanup();
|
||||
}
|
||||
|
||||
/**
|
||||
* @group RoutingWeirdness
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\DataProvider('dataAllowFederationOnPublicShares')]
|
||||
#[\PHPUnit\Framework\Attributes\Group('RoutingWeirdness')]
|
||||
public function testCreateShareLinkPublicUpload(array $appConfig, int $permissions): void {
|
||||
$this->appConfig->method('getValueBool')
|
||||
->willReturnMap([$appConfig]);
|
||||
|
|
@ -441,8 +436,8 @@ class ApiTest extends TestCase {
|
|||
|
||||
/**
|
||||
* @medium
|
||||
* @group RoutingWeirdness
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('RoutingWeirdness')]
|
||||
public function testPublicLinkUrl(): void {
|
||||
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
|
||||
$result = $ocs->createShare($this->folder, Constants::PERMISSION_ALL, IShare::TYPE_LINK);
|
||||
|
|
@ -489,9 +484,9 @@ class ApiTest extends TestCase {
|
|||
|
||||
/**
|
||||
* @medium
|
||||
* @depends testCreateShareUserFile
|
||||
* @depends testCreateShareLink
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Depends('testCreateShareUserFile')]
|
||||
#[\PHPUnit\Framework\Attributes\Depends('testCreateShareLink')]
|
||||
public function testGetShareFromSource(): void {
|
||||
$node = $this->userFolder->get($this->filename);
|
||||
$share = $this->shareManager->newShare();
|
||||
|
|
@ -522,9 +517,9 @@ class ApiTest extends TestCase {
|
|||
|
||||
/**
|
||||
* @medium
|
||||
* @depends testCreateShareUserFile
|
||||
* @depends testCreateShareLink
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Depends('testCreateShareUserFile')]
|
||||
#[\PHPUnit\Framework\Attributes\Depends('testCreateShareLink')]
|
||||
public function testGetShareFromSourceWithReshares(): void {
|
||||
$node = $this->userFolder->get($this->filename);
|
||||
$share1 = $this->shareManager->newShare();
|
||||
|
|
@ -564,8 +559,8 @@ class ApiTest extends TestCase {
|
|||
|
||||
/**
|
||||
* @medium
|
||||
* @depends testCreateShareUserFile
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Depends('testCreateShareUserFile')]
|
||||
public function testGetShareFromId(): void {
|
||||
$node = $this->userFolder->get($this->filename);
|
||||
$share1 = $this->shareManager->newShare();
|
||||
|
|
@ -958,9 +953,9 @@ class ApiTest extends TestCase {
|
|||
|
||||
/**
|
||||
* @medium
|
||||
* @depends testCreateShareUserFile
|
||||
* @depends testCreateShareLink
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Depends('testCreateShareUserFile')]
|
||||
#[\PHPUnit\Framework\Attributes\Depends('testCreateShareLink')]
|
||||
public function testUpdateShare(): void {
|
||||
$password = md5(time());
|
||||
|
||||
|
|
@ -1135,8 +1130,8 @@ class ApiTest extends TestCase {
|
|||
|
||||
/**
|
||||
* @medium
|
||||
* @depends testCreateShareUserFile
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Depends('testCreateShareUserFile')]
|
||||
public function testDeleteShare(): void {
|
||||
$node1 = $this->userFolder->get($this->filename);
|
||||
$share1 = $this->shareManager->newShare();
|
||||
|
|
@ -1323,10 +1318,9 @@ class ApiTest extends TestCase {
|
|||
|
||||
/**
|
||||
* Make sure only ISO 8601 dates are accepted
|
||||
*
|
||||
* @group RoutingWeirdness
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\DataProvider('datesProvider')]
|
||||
#[\PHPUnit\Framework\Attributes\Group('RoutingWeirdness')]
|
||||
public function testPublicLinkExpireDate($date, $valid): void {
|
||||
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
|
||||
|
||||
|
|
@ -1356,9 +1350,7 @@ class ApiTest extends TestCase {
|
|||
$this->shareManager->deleteShare($share);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group RoutingWeirdness
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('RoutingWeirdness')]
|
||||
public function testCreatePublicLinkExpireDateValid(): void {
|
||||
$config = Server::get(IConfig::class);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,9 +22,8 @@ use OCP\Share\IShare;
|
|||
|
||||
/**
|
||||
* Class CacheTest
|
||||
*
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class CacheTest extends TestCase {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -31,9 +31,8 @@ use Psr\Log\LoggerInterface;
|
|||
|
||||
/**
|
||||
* Class CapabilitiesTest
|
||||
*
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class CapabilitiesTest extends \Test\TestCase {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ use Test\TestCase;
|
|||
/**
|
||||
* Class CleanupRemoteStoragesTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_Sharing\Tests\Command
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class CleanupRemoteStoragesTest extends TestCase {
|
||||
|
||||
protected IDBConnection $connection;
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ use Test\Traits\EmailValidatorTrait;
|
|||
* Class ShareAPIControllerTest
|
||||
*
|
||||
* @package OCA\Files_Sharing\Tests\Controller
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ShareAPIControllerTest extends TestCase {
|
||||
use EmailValidatorTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,10 +50,9 @@ use OCP\Share\IShare;
|
|||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_Sharing\Controllers
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ShareControllerTest extends \Test\TestCase {
|
||||
|
||||
private string $user;
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ use PHPUnit\Framework\MockObject\MockObject;
|
|||
/**
|
||||
* Class ShareesTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_Sharing\Tests\API
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ShareesAPIControllerTest extends TestCase {
|
||||
/** @var ShareesAPIController */
|
||||
protected $sharees;
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ use OCP\Share\IShare;
|
|||
/**
|
||||
* Class DeleteOrphanedSharesJobTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_Sharing\Tests
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class DeleteOrphanedSharesJobTest extends \Test\TestCase {
|
||||
/**
|
||||
* @var bool
|
||||
|
|
|
|||
|
|
@ -12,9 +12,7 @@ use OCP\ITempManager;
|
|||
use OCP\Server;
|
||||
use Test\Traits\EncryptionTrait;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class EncryptedSizePropagationTest extends SizePropagationTest {
|
||||
use EncryptionTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ use OCP\Share\IShare;
|
|||
/**
|
||||
* Class EtagPropagationTest
|
||||
*
|
||||
* @group SLOWDB
|
||||
*
|
||||
* @package OCA\Files_Sharing\Tests
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('SLOWDB')]
|
||||
class EtagPropagationTest extends PropagationTestCase {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ use OCP\Share\IShare;
|
|||
/**
|
||||
* Class ExpireSharesJobTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_Sharing\Tests
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ExpireSharesJobTest extends \Test\TestCase {
|
||||
|
||||
/** @var ExpireSharesJob */
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ use OCP\IUserManager;
|
|||
/**
|
||||
* Class Cache
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_Sharing\Tests\External
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class CacheTest extends TestCase {
|
||||
/** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
|
||||
protected $contactsManager;
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ use Test\Traits\UserTrait;
|
|||
/**
|
||||
* Class ManagerTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_Sharing\Tests\External
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ManagerTest extends TestCase {
|
||||
use UserTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,9 +12,7 @@ use OCA\Files_Sharing\External\Scanner;
|
|||
use OCA\Files_Sharing\External\Storage;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ScannerTest extends TestCase {
|
||||
protected Scanner $scanner;
|
||||
/** @var Storage|\PHPUnit\Framework\MockObject\MockObject */
|
||||
|
|
|
|||
|
|
@ -16,9 +16,8 @@ use OCP\Http\Client\IResponse;
|
|||
|
||||
/**
|
||||
* Tests for the external Storage class for remote shares.
|
||||
*
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ExternalStorageTest extends \Test\TestCase {
|
||||
public static function optionsProvider() {
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -13,10 +13,9 @@ use OCP\Constants;
|
|||
use OCP\Share\IShare;
|
||||
|
||||
/**
|
||||
* @group SLOWDB
|
||||
*
|
||||
* @package OCA\Files_Sharing\Tests
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('SLOWDB')]
|
||||
class GroupEtagPropagationTest extends PropagationTestCase {
|
||||
/**
|
||||
* "user1" creates /test, /test/sub and shares with group1
|
||||
|
|
|
|||
|
|
@ -14,9 +14,8 @@ use OCP\Server;
|
|||
|
||||
/**
|
||||
* Class HelperTest
|
||||
*
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class HelperTest extends TestCase {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ use OCP\Share\IShare;
|
|||
/**
|
||||
* Class LockingTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_Sharing\Tests
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class LockingTest extends TestCase {
|
||||
/**
|
||||
* @var \Test\Util\User\Dummy
|
||||
|
|
|
|||
|
|
@ -17,9 +17,8 @@ use OCP\Share\IShare;
|
|||
|
||||
/**
|
||||
* Class SetPasswordColumnTest
|
||||
*
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class SetPasswordColumnTest extends TestCase {
|
||||
|
||||
/** @var IDBConnection */
|
||||
|
|
|
|||
|
|
@ -25,9 +25,7 @@ use OCP\Share\IShare;
|
|||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class MountProviderTest extends \Test\TestCase {
|
||||
|
||||
protected MountProvider $provider;
|
||||
|
|
|
|||
|
|
@ -19,9 +19,8 @@ use OCP\Share\IShare;
|
|||
|
||||
/**
|
||||
* Class ShareTest
|
||||
*
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class ShareTest extends TestCase {
|
||||
public const TEST_FOLDER_NAME = '/folder_share_api_test';
|
||||
|
||||
|
|
|
|||
|
|
@ -22,9 +22,8 @@ use OCP\Share\IShare;
|
|||
|
||||
/**
|
||||
* Class SharedMountTest
|
||||
*
|
||||
* @group SLOWDB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('SLOWDB')]
|
||||
class SharedMountTest extends TestCase {
|
||||
|
||||
/** @var IGroupManager */
|
||||
|
|
|
|||
|
|
@ -25,9 +25,8 @@ use OCP\Share\IShare;
|
|||
|
||||
/**
|
||||
* Class SharedStorageTest
|
||||
*
|
||||
* @group DB
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class SharedStorageTest extends TestCase {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ use Psr\Log\LoggerInterface;
|
|||
/**
|
||||
* Class SharesReminderJobTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_Sharing\Tests
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class SharesReminderJobTest extends \Test\TestCase {
|
||||
private SharesReminderJob $job;
|
||||
private IDBConnection $db;
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ use Test\Traits\UserTrait;
|
|||
/**
|
||||
* Class SizePropagationTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_Sharing\Tests
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class SizePropagationTest extends TestCase {
|
||||
use UserTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,12 +27,9 @@ use OCP\Share\IShare;
|
|||
use Test\Traits\MountProviderTrait;
|
||||
|
||||
/**
|
||||
* Class TestCase
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* Base class for sharing tests.
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
abstract class TestCase extends \Test\TestCase {
|
||||
use MountProviderTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ use OCP\Util;
|
|||
/**
|
||||
* Class UnshareChildrenTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\Files_Sharing\Tests
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
||||
class UnshareChildrenTest extends TestCase {
|
||||
protected $subsubfolder;
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue