diff options
Diffstat (limited to 'tests')
421 files changed, 1878 insertions, 2206 deletions
diff --git a/tests/Core/Command/Apps/AppsDisableTest.php b/tests/Core/Command/Apps/AppsDisableTest.php index 283727c1a04..117af958054 100644 --- a/tests/Core/Command/Apps/AppsDisableTest.php +++ b/tests/Core/Command/Apps/AppsDisableTest.php @@ -37,12 +37,12 @@ class AppsDisableTest extends TestCase { } /** - * @dataProvider dataCommandInput * @param $appId * @param $groups * @param $statusCode * @param $pattern */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCommandInput')] public function testCommandInput($appId, $statusCode, $pattern): void { $input = ['app-id' => $appId]; diff --git a/tests/Core/Command/Apps/AppsEnableTest.php b/tests/Core/Command/Apps/AppsEnableTest.php index efaa7da984b..604c670ae15 100644 --- a/tests/Core/Command/Apps/AppsEnableTest.php +++ b/tests/Core/Command/Apps/AppsEnableTest.php @@ -41,12 +41,12 @@ class AppsEnableTest extends TestCase { } /** - * @dataProvider dataCommandInput * @param $appId * @param $groups * @param $statusCode * @param $pattern */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCommandInput')] public function testCommandInput($appId, $groups, $statusCode, $pattern): void { $input = ['app-id' => $appId]; diff --git a/tests/Core/Command/Config/App/DeleteConfigTest.php b/tests/Core/Command/Config/App/DeleteConfigTest.php index 6f7bfbf3a7c..9e43f389214 100644 --- a/tests/Core/Command/Config/App/DeleteConfigTest.php +++ b/tests/Core/Command/Config/App/DeleteConfigTest.php @@ -70,9 +70,7 @@ class DeleteConfigTest extends TestCase { ]; } - /** - * @dataProvider dataDelete - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataDelete')] public function testDelete(string $configName, bool $configExists, bool $checkIfExists, int $expectedReturn, string $expectedMessage): void { $this->appConfig->expects(($checkIfExists) ? $this->once() : $this->never()) ->method('getKeys') diff --git a/tests/Core/Command/Config/App/GetConfigTest.php b/tests/Core/Command/Config/App/GetConfigTest.php index 63a02f263d0..13392cddf55 100644 --- a/tests/Core/Command/Config/App/GetConfigTest.php +++ b/tests/Core/Command/Config/App/GetConfigTest.php @@ -80,9 +80,7 @@ class GetConfigTest extends TestCase { ]; } - /** - * @dataProvider dataGet - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGet')] public function testGet(string $configName, mixed $value, bool $configExists, mixed $defaultValue, bool $hasDefault, string $outputFormat, int $expectedReturn, ?string $expectedMessage): void { if (!$expectedReturn) { if ($configExists) { diff --git a/tests/Core/Command/Config/App/SetConfigTest.php b/tests/Core/Command/Config/App/SetConfigTest.php index 596439d85a8..a5c62368163 100644 --- a/tests/Core/Command/Config/App/SetConfigTest.php +++ b/tests/Core/Command/Config/App/SetConfigTest.php @@ -60,9 +60,7 @@ class SetConfigTest extends TestCase { ]; } - /** - * @dataProvider dataSet - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSet')] public function testSet(string $configName, mixed $newValue, bool $configExists, bool $updateOnly, bool $updated, string $expectedMessage): void { $this->appConfig->method('hasKey') ->with('app-name', $configName) diff --git a/tests/Core/Command/Config/ImportTest.php b/tests/Core/Command/Config/ImportTest.php index 3cce8cb0243..14cdd714d12 100644 --- a/tests/Core/Command/Config/ImportTest.php +++ b/tests/Core/Command/Config/ImportTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -34,7 +35,7 @@ class ImportTest extends TestCase { $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); - /** @var \OCP\IConfig $config */ + /** @var IConfig $config */ $this->command = new Import($config); } @@ -49,10 +50,9 @@ class ImportTest extends TestCase { } /** - * @dataProvider validateAppsArrayData - * * @param mixed $configValue */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateAppsArrayData')] public function testValidateAppsArray($configValue): void { $this->invokePrivate($this->command, 'validateAppsArray', [['app' => ['name' => $configValue]]]); $this->assertTrue(true, 'Asserting that no exception is thrown'); @@ -68,10 +68,9 @@ class ImportTest extends TestCase { } /** - * @dataProvider validateAppsArrayThrowsData - * * @param mixed $configValue */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateAppsArrayThrowsData')] public function testValidateAppsArrayThrows($configValue): void { try { $this->invokePrivate($this->command, 'validateAppsArray', [['app' => ['name' => $configValue]]]); @@ -98,10 +97,9 @@ class ImportTest extends TestCase { } /** - * @dataProvider checkTypeRecursivelyData - * * @param mixed $configValue */ + #[\PHPUnit\Framework\Attributes\DataProvider('checkTypeRecursivelyData')] public function testCheckTypeRecursively($configValue): void { $this->invokePrivate($this->command, 'checkTypeRecursively', [$configValue, 'name']); $this->assertTrue(true, 'Asserting that no exception is thrown'); @@ -117,10 +115,9 @@ class ImportTest extends TestCase { } /** - * @dataProvider checkTypeRecursivelyThrowsData - * * @param mixed $configValue */ + #[\PHPUnit\Framework\Attributes\DataProvider('checkTypeRecursivelyThrowsData')] public function testCheckTypeRecursivelyThrows($configValue): void { try { $this->invokePrivate($this->command, 'checkTypeRecursively', [$configValue, 'name']); @@ -139,10 +136,9 @@ class ImportTest extends TestCase { } /** - * @dataProvider validateArrayData - * * @param array $configArray */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateArrayData')] public function testValidateArray($configArray): void { $this->invokePrivate($this->command, 'validateArray', [$configArray]); $this->assertTrue(true, 'Asserting that no exception is thrown'); @@ -157,11 +153,11 @@ class ImportTest extends TestCase { } /** - * @dataProvider validateArrayThrowsData * * @param mixed $configArray * @param string $expectedException */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateArrayThrowsData')] public function testValidateArrayThrows($configArray, $expectedException): void { try { $this->invokePrivate($this->command, 'validateArray', [$configArray]); diff --git a/tests/Core/Command/Config/ListConfigsTest.php b/tests/Core/Command/Config/ListConfigsTest.php index 216a6133579..2f2de288e9d 100644 --- a/tests/Core/Command/Config/ListConfigsTest.php +++ b/tests/Core/Command/Config/ListConfigsTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -261,7 +262,6 @@ class ListConfigsTest extends TestCase { } /** - * @dataProvider listData * * @param string $app * @param array $systemConfigs @@ -270,6 +270,7 @@ class ListConfigsTest extends TestCase { * @param bool $private * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('listData')] public function testList($app, $systemConfigs, $systemConfigMap, $appConfig, $private, $expected): void { $this->systemConfig->expects($this->any()) ->method('getKeys') diff --git a/tests/Core/Command/Config/System/CastHelperTest.php b/tests/Core/Command/Config/System/CastHelperTest.php index 0d3ca032026..924887daaf7 100644 --- a/tests/Core/Command/Config/System/CastHelperTest.php +++ b/tests/Core/Command/Config/System/CastHelperTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only @@ -36,9 +37,7 @@ class CastHelperTest extends TestCase { ]; } - /** - * @dataProvider castValueProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('castValueProvider')] public function testCastValue($value, $type, $expectedValue): void { $this->assertSame( $expectedValue, @@ -58,9 +57,7 @@ class CastHelperTest extends TestCase { ]; } - /** - * @dataProvider castValueInvalidProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('castValueInvalidProvider')] public function testCastValueInvalid($value, $type): void { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/Core/Command/Config/System/DeleteConfigTest.php b/tests/Core/Command/Config/System/DeleteConfigTest.php index 31e238573d0..b0a3580e1cd 100644 --- a/tests/Core/Command/Config/System/DeleteConfigTest.php +++ b/tests/Core/Command/Config/System/DeleteConfigTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -34,7 +35,7 @@ class DeleteConfigTest extends TestCase { $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); - /** @var \OC\SystemConfig $systemConfig */ + /** @var SystemConfig $systemConfig */ $this->command = new DeleteConfig($systemConfig); } @@ -72,7 +73,6 @@ class DeleteConfigTest extends TestCase { } /** - * @dataProvider deleteData * * @param string $configName * @param bool $configExists @@ -80,6 +80,7 @@ class DeleteConfigTest extends TestCase { * @param int $expectedReturn * @param string $expectedMessage */ + #[\PHPUnit\Framework\Attributes\DataProvider('deleteData')] public function testDelete($configName, $configExists, $checkIfExists, $expectedReturn, $expectedMessage): void { $this->systemConfig->expects(($checkIfExists) ? $this->once() : $this->never()) ->method('getKeys') @@ -165,7 +166,6 @@ class DeleteConfigTest extends TestCase { } /** - * @dataProvider deleteArrayData * * @param string[] $configNames * @param bool $configKeyExists @@ -175,6 +175,7 @@ class DeleteConfigTest extends TestCase { * @param int $expectedReturn * @param string $expectedMessage */ + #[\PHPUnit\Framework\Attributes\DataProvider('deleteArrayData')] public function testArrayDelete(array $configNames, $configKeyExists, $checkIfKeyExists, $configValue, $updateValue, $expectedReturn, $expectedMessage): void { $this->systemConfig->expects(($checkIfKeyExists) ? $this->once() : $this->never()) ->method('getKeys') diff --git a/tests/Core/Command/Config/System/GetConfigTest.php b/tests/Core/Command/Config/System/GetConfigTest.php index daaee5605b7..8b84fd14198 100644 --- a/tests/Core/Command/Config/System/GetConfigTest.php +++ b/tests/Core/Command/Config/System/GetConfigTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -34,7 +35,7 @@ class GetConfigTest extends TestCase { $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); - /** @var \OC\SystemConfig $systemConfig */ + /** @var SystemConfig $systemConfig */ $this->command = new GetConfig($systemConfig); } @@ -88,7 +89,6 @@ class GetConfigTest extends TestCase { } /** - * @dataProvider getData * * @param string[] $configNames * @param mixed $value @@ -99,6 +99,7 @@ class GetConfigTest extends TestCase { * @param int $expectedReturn * @param string $expectedMessage */ + #[\PHPUnit\Framework\Attributes\DataProvider('getData')] public function testGet($configNames, $value, $configExists, $defaultValue, $hasDefault, $outputFormat, $expectedReturn, $expectedMessage): void { if (is_array($configNames)) { $configName = $configNames[0]; diff --git a/tests/Core/Command/Config/System/SetConfigTest.php b/tests/Core/Command/Config/System/SetConfigTest.php index 73fee8bee5f..a99b832c160 100644 --- a/tests/Core/Command/Config/System/SetConfigTest.php +++ b/tests/Core/Command/Config/System/SetConfigTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -35,7 +36,7 @@ class SetConfigTest extends TestCase { $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); - /** @var \OC\SystemConfig $systemConfig */ + /** @var SystemConfig $systemConfig */ $this->command = new SetConfig($systemConfig, new CastHelper()); } @@ -49,13 +50,13 @@ class SetConfigTest extends TestCase { } /** - * @dataProvider dataTest * * @param array $configNames * @param string $newValue * @param mixed $existingData * @param mixed $expectedValue */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTest')] public function testSet($configNames, $newValue, $existingData, $expectedValue): void { $this->systemConfig->expects($this->once()) ->method('setValue') @@ -86,9 +87,7 @@ class SetConfigTest extends TestCase { ]; } - /** - * @dataProvider setUpdateOnlyProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('setUpdateOnlyProvider')] public function testSetUpdateOnly($configNames, $existingData): void { $this->expectException(\UnexpectedValueException::class); diff --git a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php index a2d1434e905..0bc6cbb64cf 100644 --- a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php +++ b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -45,7 +46,7 @@ class ChangeKeyStorageRootTest extends TestCase { /** @var OutputInterface | \PHPUnit\Framework\MockObject\MockObject */ protected $outputInterface; - /** @var \OCP\UserInterface | \PHPUnit\Framework\MockObject\MockObject */ + /** @var UserInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $userInterface; protected function setUp(): void { @@ -77,9 +78,7 @@ class ChangeKeyStorageRootTest extends TestCase { ); } - /** - * @dataProvider dataTestExecute - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestExecute')] public function testExecute($newRoot, $answer, $successMoveKey): void { $changeKeyStorageRoot = $this->getMockBuilder('OC\Core\Command\Encryption\ChangeKeyStorageRoot') ->setConstructorArgs( @@ -134,7 +133,7 @@ class ChangeKeyStorageRootTest extends TestCase { } public function testMoveAllKeys(): void { - /** @var \OC\Core\Command\Encryption\ChangeKeyStorageRoot $changeKeyStorageRoot */ + /** @var ChangeKeyStorageRoot $changeKeyStorageRoot */ $changeKeyStorageRoot = $this->getMockBuilder('OC\Core\Command\Encryption\ChangeKeyStorageRoot') ->setConstructorArgs( [ @@ -165,11 +164,11 @@ class ChangeKeyStorageRootTest extends TestCase { } /** - * @dataProvider dataTestPrepareNewRootException * * @param bool $dirExists * @param bool $couldCreateFile */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestPrepareNewRootException')] public function testPrepareNewRootException($dirExists, $couldCreateFile): void { $this->expectException(\Exception::class); @@ -189,12 +188,12 @@ class ChangeKeyStorageRootTest extends TestCase { } /** - * @dataProvider dataTestMoveSystemKeys * * @param bool $dirExists * @param bool $targetExists * @param bool $executeRename */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestMoveSystemKeys')] public function testMoveSystemKeys($dirExists, $targetExists, $executeRename): void { $changeKeyStorageRoot = $this->getMockBuilder('OC\Core\Command\Encryption\ChangeKeyStorageRoot') ->setConstructorArgs( @@ -255,13 +254,13 @@ class ChangeKeyStorageRootTest extends TestCase { } /** - * @dataProvider dataTestMoveUserEncryptionFolder * * @param bool $userExists * @param bool $isDir * @param bool $targetExists * @param bool $shouldRename */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestMoveUserEncryptionFolder')] public function testMoveUserEncryptionFolder($userExists, $isDir, $targetExists, $shouldRename): void { $changeKeyStorageRoot = $this->getMockBuilder('OC\Core\Command\Encryption\ChangeKeyStorageRoot') ->setConstructorArgs( @@ -307,9 +306,7 @@ class ChangeKeyStorageRootTest extends TestCase { } - /** - * @dataProvider dataTestPrepareParentFolder - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestPrepareParentFolder')] public function testPrepareParentFolder($path, $pathExists): void { $this->view->expects($this->any())->method('file_exists') ->willReturnCallback( diff --git a/tests/Core/Command/Encryption/DecryptAllTest.php b/tests/Core/Command/Encryption/DecryptAllTest.php index ea22c101845..41d9e4c713f 100644 --- a/tests/Core/Command/Encryption/DecryptAllTest.php +++ b/tests/Core/Command/Encryption/DecryptAllTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -17,13 +18,13 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class DecryptAllTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IConfig */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IConfig */ protected $config; /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Encryption\IManager */ protected $encryptionManager; - /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\App\IAppManager */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IAppManager */ protected $appManager; /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Input\InputInterface */ @@ -109,9 +110,7 @@ class DecryptAllTest extends TestCase { $this->invokePrivate($instance, 'resetMaintenanceAndTrashbin'); } - /** - * @dataProvider dataTestExecute - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestExecute')] public function testExecute($encryptionEnabled, $continue): void { $instance = new DecryptAll( $this->encryptionManager, diff --git a/tests/Core/Command/Encryption/DisableTest.php b/tests/Core/Command/Encryption/DisableTest.php index 4cbc92a5f8a..a89fd636e47 100644 --- a/tests/Core/Command/Encryption/DisableTest.php +++ b/tests/Core/Command/Encryption/DisableTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -33,7 +34,7 @@ class DisableTest extends TestCase { $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); - /** @var \OCP\IConfig $config */ + /** @var IConfig $config */ $this->command = new Disable($config); } @@ -46,12 +47,12 @@ class DisableTest extends TestCase { } /** - * @dataProvider dataDisable * * @param string $oldStatus * @param bool $isUpdating * @param string $expectedString */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataDisable')] public function testDisable($oldStatus, $isUpdating, $expectedString): void { $this->config->expects($this->once()) ->method('getAppValue') diff --git a/tests/Core/Command/Encryption/EnableTest.php b/tests/Core/Command/Encryption/EnableTest.php index e4f8ae9eacf..32d1a7576f5 100644 --- a/tests/Core/Command/Encryption/EnableTest.php +++ b/tests/Core/Command/Encryption/EnableTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -55,9 +56,7 @@ class EnableTest extends TestCase { ]; } - /** - * @dataProvider dataEnable - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataEnable')] public function testEnable(string $oldStatus, ?string $defaultModule, array $availableModules, bool $isUpdating, string $expectedString, string $expectedDefaultModuleString): void { if ($isUpdating) { $this->config->expects($this->once()) diff --git a/tests/Core/Command/Encryption/EncryptAllTest.php b/tests/Core/Command/Encryption/EncryptAllTest.php index 1c59a3705af..6332c936a98 100644 --- a/tests/Core/Command/Encryption/EncryptAllTest.php +++ b/tests/Core/Command/Encryption/EncryptAllTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -18,13 +19,13 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class EncryptAllTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IConfig */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IConfig */ protected $config; /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Encryption\IManager */ protected $encryptionManager; - /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\App\IAppManager */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IAppManager */ protected $appManager; /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Input\InputInterface */ @@ -36,7 +37,7 @@ class EncryptAllTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Helper\QuestionHelper */ protected $questionHelper; - /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Encryption\IEncryptionModule */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IEncryptionModule */ protected $encryptionModule; /** @var EncryptAll */ @@ -77,9 +78,7 @@ class EncryptAllTest extends TestCase { $this->invokePrivate($instance, 'resetMaintenanceAndTrashbin'); } - /** - * @dataProvider dataTestExecute - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestExecute')] public function testExecute($answer, $askResult): void { $command = new EncryptAll($this->encryptionManager, $this->appManager, $this->config, $this->questionHelper); diff --git a/tests/Core/Command/Encryption/SetDefaultModuleTest.php b/tests/Core/Command/Encryption/SetDefaultModuleTest.php index 4ba7b7e8c97..df38d730db3 100644 --- a/tests/Core/Command/Encryption/SetDefaultModuleTest.php +++ b/tests/Core/Command/Encryption/SetDefaultModuleTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -52,7 +53,6 @@ class SetDefaultModuleTest extends TestCase { } /** - * @dataProvider dataSetDefaultModule * * @param string $oldModule * @param string $newModule @@ -60,6 +60,7 @@ class SetDefaultModuleTest extends TestCase { * @param bool $updateSuccess * @param string $expectedString */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetDefaultModule')] public function testSetDefaultModule($oldModule, $newModule, $updateModule, $updateSuccess, $expectedString): void { $this->consoleInput->expects($this->once()) ->method('getArgument') @@ -90,7 +91,6 @@ class SetDefaultModuleTest extends TestCase { } /** - * @dataProvider dataSetDefaultModule * * @param string $oldModule * @param string $newModule @@ -98,6 +98,7 @@ class SetDefaultModuleTest extends TestCase { * @param bool $updateSuccess * @param string $expectedString */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetDefaultModule')] public function testMaintenanceMode($oldModule, $newModule, $updateModule, $updateSuccess, $expectedString): void { $this->consoleInput->expects($this->never()) ->method('getArgument') diff --git a/tests/Core/Command/Group/AddTest.php b/tests/Core/Command/Group/AddTest.php index c953199766f..24f2d823292 100644 --- a/tests/Core/Command/Group/AddTest.php +++ b/tests/Core/Command/Group/AddTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/Group/AddUserTest.php b/tests/Core/Command/Group/AddUserTest.php index 4bbf54f7b3f..68c8cecdba1 100644 --- a/tests/Core/Command/Group/AddUserTest.php +++ b/tests/Core/Command/Group/AddUserTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/Group/DeleteTest.php b/tests/Core/Command/Group/DeleteTest.php index 4b4f16feb76..289c6a7c322 100644 --- a/tests/Core/Command/Group/DeleteTest.php +++ b/tests/Core/Command/Group/DeleteTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/Group/InfoTest.php b/tests/Core/Command/Group/InfoTest.php index ffd716f502d..87f59d2adc4 100644 --- a/tests/Core/Command/Group/InfoTest.php +++ b/tests/Core/Command/Group/InfoTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/Group/ListCommandTest.php b/tests/Core/Command/Group/ListCommandTest.php index 72cf44aa113..aaca772d714 100644 --- a/tests/Core/Command/Group/ListCommandTest.php +++ b/tests/Core/Command/Group/ListCommandTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/Group/RemoveUserTest.php b/tests/Core/Command/Group/RemoveUserTest.php index 98fe41784f1..74343e77d3f 100644 --- a/tests/Core/Command/Group/RemoveUserTest.php +++ b/tests/Core/Command/Group/RemoveUserTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/Log/FileTest.php b/tests/Core/Command/Log/FileTest.php index 627f2b0e08f..1aaf398b875 100644 --- a/tests/Core/Command/Log/FileTest.php +++ b/tests/Core/Command/Log/FileTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -71,9 +72,7 @@ class FileTest extends TestCase { ]; } - /** - * @dataProvider changeRotateSizeProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('changeRotateSizeProvider')] public function testChangeRotateSize($optionValue, $configValue): void { $this->config->method('getSystemValue')->willReturnArgument(1); $this->consoleInput->method('getOption') diff --git a/tests/Core/Command/Log/ManageTest.php b/tests/Core/Command/Log/ManageTest.php index 9a21fe6dc56..8b307048719 100644 --- a/tests/Core/Command/Log/ManageTest.php +++ b/tests/Core/Command/Log/ManageTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -99,9 +100,7 @@ class ManageTest extends TestCase { ]; } - /** - * @dataProvider dataConvertLevelString - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataConvertLevelString')] public function testConvertLevelString(string $levelString, int $expectedInt): void { $this->assertEquals($expectedInt, self::invokePrivate($this->command, 'convertLevelString', [$levelString]) @@ -125,9 +124,7 @@ class ManageTest extends TestCase { ]; } - /** - * @dataProvider dataConvertLevelNumber - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataConvertLevelNumber')] public function testConvertLevelNumber(int $levelNum, string $expectedString): void { $this->assertEquals($expectedString, self::invokePrivate($this->command, 'convertLevelNumber', [$levelNum]) diff --git a/tests/Core/Command/Maintenance/DataFingerprintTest.php b/tests/Core/Command/Maintenance/DataFingerprintTest.php index 3d56d891bef..99004a7a5f5 100644 --- a/tests/Core/Command/Maintenance/DataFingerprintTest.php +++ b/tests/Core/Command/Maintenance/DataFingerprintTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -35,7 +36,7 @@ class DataFingerprintTest extends TestCase { $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); - /** @var \OCP\IConfig $config */ + /** @var IConfig $config */ $this->command = new DataFingerprint($this->config, $this->timeFactory); } diff --git a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php index 532e965cc89..b85dcf87bbc 100644 --- a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php +++ b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/Core/Command/Maintenance/ModeTest.php b/tests/Core/Command/Maintenance/ModeTest.php index 85efbffdc0b..5a9a90b0197 100644 --- a/tests/Core/Command/Maintenance/ModeTest.php +++ b/tests/Core/Command/Maintenance/ModeTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -111,7 +112,6 @@ class ModeTest extends TestCase { /** * Asserts that execute works as expected. * - * @dataProvider getExecuteTestData * @param string $option The command option. * @param bool $currentMaintenanceState The current maintenance state. * @param null|bool $expectedMaintenanceState @@ -119,6 +119,7 @@ class ModeTest extends TestCase { * @param string $expectedOutput The expected command output. * @throws \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('getExecuteTestData')] public function testExecute( string $option, bool $currentMaintenanceState, diff --git a/tests/Core/Command/Maintenance/UpdateTheme.php b/tests/Core/Command/Maintenance/UpdateTheme.php index 41b95d358d3..9c9a2b903a7 100644 --- a/tests/Core/Command/Maintenance/UpdateTheme.php +++ b/tests/Core/Command/Maintenance/UpdateTheme.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/Preview/CleanupTest.php b/tests/Core/Command/Preview/CleanupTest.php index fcbb7582ca3..e4a83246e5b 100644 --- a/tests/Core/Command/Preview/CleanupTest.php +++ b/tests/Core/Command/Preview/CleanupTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -99,9 +100,7 @@ class CleanupTest extends TestCase { $this->assertEquals(1, $this->repair->run($this->input, $this->output)); } - /** - * @dataProvider dataForTestCleanupWithDeleteException - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataForTestCleanupWithDeleteException')] public function testCleanupWithDeleteException(string $exceptionClass, string $errorMessage): void { $previewFolder = $this->createMock(Folder::class); $previewFolder->expects($this->once()) diff --git a/tests/Core/Command/Preview/RepairTest.php b/tests/Core/Command/Preview/RepairTest.php index 7e45a8d3a19..9b9cde6dd95 100644 --- a/tests/Core/Command/Preview/RepairTest.php +++ b/tests/Core/Command/Preview/RepairTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -110,9 +111,7 @@ class RepairTest extends TestCase { ]; } - /** - * @dataProvider dataEmptyTest - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataEmptyTest')] public function testEmptyExecute($directoryNames, $expectedOutput): void { $previewFolder = $this->getMockBuilder(Folder::class) ->getMock(); diff --git a/tests/Core/Command/SystemTag/AddTest.php b/tests/Core/Command/SystemTag/AddTest.php index 68d9b494502..5f3c7174758 100644 --- a/tests/Core/Command/SystemTag/AddTest.php +++ b/tests/Core/Command/SystemTag/AddTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/SystemTag/DeleteTest.php b/tests/Core/Command/SystemTag/DeleteTest.php index 716b6a3b830..bf756311000 100644 --- a/tests/Core/Command/SystemTag/DeleteTest.php +++ b/tests/Core/Command/SystemTag/DeleteTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/SystemTag/EditTest.php b/tests/Core/Command/SystemTag/EditTest.php index cc68f8004f5..b22151e3608 100644 --- a/tests/Core/Command/SystemTag/EditTest.php +++ b/tests/Core/Command/SystemTag/EditTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/SystemTag/ListCommandTest.php b/tests/Core/Command/SystemTag/ListCommandTest.php index a2c52a03244..e1ff8290633 100644 --- a/tests/Core/Command/SystemTag/ListCommandTest.php +++ b/tests/Core/Command/SystemTag/ListCommandTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/User/AddTest.php b/tests/Core/Command/User/AddTest.php index 546061fc2f0..5a8bc3abea1 100644 --- a/tests/Core/Command/User/AddTest.php +++ b/tests/Core/Command/User/AddTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -83,9 +84,7 @@ class AddTest extends TestCase { ); } - /** - * @dataProvider addEmailDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('addEmailDataProvider')] public function testAddEmail( ?string $email, bool $isEmailValid, diff --git a/tests/Core/Command/User/AuthTokens/DeleteTest.php b/tests/Core/Command/User/AuthTokens/DeleteTest.php index 1396fe53084..6692473c240 100644 --- a/tests/Core/Command/User/AuthTokens/DeleteTest.php +++ b/tests/Core/Command/User/AuthTokens/DeleteTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/User/DeleteTest.php b/tests/Core/Command/User/DeleteTest.php index 010b8580819..4e06b0f91fc 100644 --- a/tests/Core/Command/User/DeleteTest.php +++ b/tests/Core/Command/User/DeleteTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -34,7 +35,7 @@ class DeleteTest extends TestCase { $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); - /** @var \OCP\IUserManager $userManager */ + /** @var IUserManager $userManager */ $this->command = new Delete($userManager); } @@ -47,11 +48,11 @@ class DeleteTest extends TestCase { } /** - * @dataProvider validUserLastSeen * * @param bool $deleteSuccess * @param string $expectedString */ + #[\PHPUnit\Framework\Attributes\DataProvider('validUserLastSeen')] public function testValidUser($deleteSuccess, $expectedString): void { $user = $this->getMockBuilder(IUser::class)->getMock(); $user->expects($this->once()) diff --git a/tests/Core/Command/User/DisableTest.php b/tests/Core/Command/User/DisableTest.php index 1e464ca93a5..c1bc10dc6bf 100644 --- a/tests/Core/Command/User/DisableTest.php +++ b/tests/Core/Command/User/DisableTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/User/EnableTest.php b/tests/Core/Command/User/EnableTest.php index b590530d93d..b2820de14ef 100644 --- a/tests/Core/Command/User/EnableTest.php +++ b/tests/Core/Command/User/EnableTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Command/User/LastSeenTest.php b/tests/Core/Command/User/LastSeenTest.php index b64b0e73ced..64c710eacc5 100644 --- a/tests/Core/Command/User/LastSeenTest.php +++ b/tests/Core/Command/User/LastSeenTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -34,7 +35,7 @@ class LastSeenTest extends TestCase { $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); - /** @var \OCP\IUserManager $userManager */ + /** @var IUserManager $userManager */ $this->command = new LastSeen($userManager); } @@ -46,11 +47,11 @@ class LastSeenTest extends TestCase { } /** - * @dataProvider validUserLastSeen * * @param int $lastSeen * @param string $expectedString */ + #[\PHPUnit\Framework\Attributes\DataProvider('validUserLastSeen')] public function testValidUser($lastSeen, $expectedString): void { $user = $this->getMockBuilder(IUser::class)->getMock(); $user->expects($this->once()) diff --git a/tests/Core/Command/User/ProfileTest.php b/tests/Core/Command/User/ProfileTest.php index 2e3227ab56b..ff5568bacfc 100644 --- a/tests/Core/Command/User/ProfileTest.php +++ b/tests/Core/Command/User/ProfileTest.php @@ -166,9 +166,7 @@ class ProfileTest extends TestCase { ]; } - /** - * @dataProvider dataCheckInput - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCheckInput')] public function testCheckInput(array $arguments, array $options, array $parameterOptions, bool $existingUser, ?string $expectedException): void { $this->consoleInput->expects($this->any()) ->method('getArgument') @@ -233,9 +231,8 @@ class ProfileTest extends TestCase { /** * Tests the deletion mechanism on profile settings. - * - * @dataProvider dataExecuteDeleteProfileProperty */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataExecuteDeleteProfileProperty')] public function testExecuteDeleteProfileProperty(string $configKey, string $value, bool $errorIfNotExists, ?string $expectedLine, int $expectedReturn): void { $uid = 'username'; $appName = 'profile'; @@ -327,9 +324,7 @@ class ProfileTest extends TestCase { ]; } - /** - * @dataProvider dataExecuteGet - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataExecuteGet')] public function testExecuteGet(string $key, string $value, ?string $defaultValue, string $expectedLine, int $expectedReturn): void { $command = $this->getCommand([ 'writeArrayInOutputFormat', diff --git a/tests/Core/Command/User/SettingTest.php b/tests/Core/Command/User/SettingTest.php index dbe81c5af78..706e5b24742 100644 --- a/tests/Core/Command/User/SettingTest.php +++ b/tests/Core/Command/User/SettingTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -163,7 +164,6 @@ class SettingTest extends TestCase { } /** - * @dataProvider dataCheckInput * * @param array $arguments * @param array $options @@ -171,6 +171,7 @@ class SettingTest extends TestCase { * @param mixed $user * @param string $expectedException */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCheckInput')] public function testCheckInput($arguments, $options, $parameterOptions, $user, $expectedException): void { $this->consoleInput->expects($this->any()) ->method('getArgument') @@ -232,13 +233,13 @@ class SettingTest extends TestCase { } /** - * @dataProvider dataExecuteDelete * * @param string|null $value * @param bool $errorIfNotExists * @param string $expectedLine * @param int $expectedReturn */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataExecuteDelete')] public function testExecuteDelete($value, $errorIfNotExists, $expectedLine, $expectedReturn): void { $command = $this->getCommand([ 'writeArrayInOutputFormat', @@ -296,13 +297,13 @@ class SettingTest extends TestCase { } /** - * @dataProvider dataExecuteSet * * @param string|null $value * @param bool $updateOnly * @param string $expectedLine * @param int $expectedReturn */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataExecuteSet')] public function testExecuteSet($value, $updateOnly, $expectedLine, $expectedReturn): void { $command = $this->getCommand([ 'writeArrayInOutputFormat', @@ -363,13 +364,13 @@ class SettingTest extends TestCase { } /** - * @dataProvider dataExecuteGet * * @param string|null $value * @param string|null $defaultValue * @param string $expectedLine * @param int $expectedReturn */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataExecuteGet')] public function testExecuteGet($value, $defaultValue, $expectedLine, $expectedReturn): void { $command = $this->getCommand([ 'writeArrayInOutputFormat', diff --git a/tests/Core/Controller/AutoCompleteControllerTest.php b/tests/Core/Controller/AutoCompleteControllerTest.php index 23fd0ac8399..c5574f78fc1 100644 --- a/tests/Core/Controller/AutoCompleteControllerTest.php +++ b/tests/Core/Controller/AutoCompleteControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -153,9 +154,7 @@ class AutoCompleteControllerTest extends TestCase { ]; } - /** - * @dataProvider searchDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('searchDataProvider')] public function testGet(array $searchResults, array $expected, string $searchTerm, ?string $itemType, ?string $itemId, ?string $sorter): void { $this->collaboratorSearch->expects($this->once()) ->method('search') diff --git a/tests/Core/Controller/AvatarControllerTest.php b/tests/Core/Controller/AvatarControllerTest.php index 4bda1713351..a78e2c1bb5c 100644 --- a/tests/Core/Controller/AvatarControllerTest.php +++ b/tests/Core/Controller/AvatarControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/Core/Controller/ChangePasswordControllerTest.php b/tests/Core/Controller/ChangePasswordControllerTest.php index 91d23c1104e..aae36fb52b8 100644 --- a/tests/Core/Controller/ChangePasswordControllerTest.php +++ b/tests/Core/Controller/ChangePasswordControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php index 34bfd104bdf..b182bb1bb39 100644 --- a/tests/Core/Controller/ClientFlowLoginControllerTest.php +++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php @@ -104,8 +104,8 @@ class ClientFlowLoginControllerTest extends TestCase { 'core', 'error', [ - 'errors' => - [ + 'errors' + => [ [ 'error' => 'Access Forbidden', 'hint' => 'Invalid request', @@ -603,11 +603,11 @@ class ClientFlowLoginControllerTest extends TestCase { } /** - * @dataProvider dataGeneratePasswordWithHttpsProxy * @param array $headers * @param string $protocol * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGeneratePasswordWithHttpsProxy')] public function testGeneratePasswordWithHttpsProxy(array $headers, $protocol, $expected): void { $this->session ->expects($this->once()) diff --git a/tests/Core/Controller/CssControllerTest.php b/tests/Core/Controller/CssControllerTest.php index cae6f7989c4..b4764d6ea3a 100644 --- a/tests/Core/Controller/CssControllerTest.php +++ b/tests/Core/Controller/CssControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Controller/GuestAvatarControllerTest.php b/tests/Core/Controller/GuestAvatarControllerTest.php index 1ad9e49f858..66a83098130 100644 --- a/tests/Core/Controller/GuestAvatarControllerTest.php +++ b/tests/Core/Controller/GuestAvatarControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -7,6 +8,7 @@ namespace Core\Controller; use OC\Core\Controller\GuestAvatarController; use OCP\AppFramework\Http\FileDisplayResponse; +use OCP\Files\File; use OCP\Files\SimpleFS\ISimpleFile; use OCP\IAvatar; use OCP\IAvatarManager; @@ -38,7 +40,7 @@ class GuestAvatarControllerTest extends \Test\TestCase { private $avatar; /** - * @var \OCP\Files\File|\PHPUnit\Framework\MockObject\MockObject + * @var File|\PHPUnit\Framework\MockObject\MockObject */ private $file; diff --git a/tests/Core/Controller/JsControllerTest.php b/tests/Core/Controller/JsControllerTest.php index 1500ed6eacf..30bc02e8625 100644 --- a/tests/Core/Controller/JsControllerTest.php +++ b/tests/Core/Controller/JsControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php index 6dcf4771f7e..18baaf5b08c 100644 --- a/tests/Core/Controller/LoginControllerTest.php +++ b/tests/Core/Controller/LoginControllerTest.php @@ -351,9 +351,7 @@ class LoginControllerTest extends TestCase { ]; } - /** - * @dataProvider passwordResetDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('passwordResetDataProvider')] public function testShowLoginFormWithPasswordResetOption($canChangePassword, $expectedResult): void { $this->userSession diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php index e6d99a6523e..bbb5f2c2e54 100644 --- a/tests/Core/Controller/LostControllerTest.php +++ b/tests/Core/Controller/LostControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only @@ -686,10 +687,10 @@ class LostControllerTest extends TestCase { } /** - * @dataProvider dataTwoUsersWithSameEmailOneDisabled * @param bool $userEnabled1 * @param bool $userEnabled2 */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTwoUsersWithSameEmailOneDisabled')] public function testTwoUsersWithSameEmailOneDisabled(bool $userEnabled1, bool $userEnabled2): void { $user1 = $this->createMock(IUser::class); $user1->method('getEMailAddress') diff --git a/tests/Core/Controller/NavigationControllerTest.php b/tests/Core/Controller/NavigationControllerTest.php index 2df705c2296..d00976f18ec 100644 --- a/tests/Core/Controller/NavigationControllerTest.php +++ b/tests/Core/Controller/NavigationControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -47,7 +48,7 @@ class NavigationControllerTest extends TestCase { [true], ]; } - /** @dataProvider dataGetNavigation */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetNavigation')] public function testGetAppNavigation(bool $absolute): void { $this->navigationManager->expects($this->once()) ->method('getAll') @@ -75,7 +76,7 @@ class NavigationControllerTest extends TestCase { } } - /** @dataProvider dataGetNavigation */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetNavigation')] public function testGetSettingsNavigation(bool $absolute): void { $this->navigationManager->expects($this->once()) ->method('getAll') diff --git a/tests/Core/Controller/OCSControllerTest.php b/tests/Core/Controller/OCSControllerTest.php index 7e83a476744..bd7e26d5e8f 100644 --- a/tests/Core/Controller/OCSControllerTest.php +++ b/tests/Core/Controller/OCSControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/Core/Controller/PreviewControllerTest.php b/tests/Core/Controller/PreviewControllerTest.php index 2c2411e666f..5a6cd1fba0a 100644 --- a/tests/Core/Controller/PreviewControllerTest.php +++ b/tests/Core/Controller/PreviewControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -19,7 +20,6 @@ use OCP\Files\Storage\IStorage; use OCP\IPreview; use OCP\IRequest; use OCP\Preview\IMimeIconProvider; -use OCP\Share\IAttributes; use OCP\Share\IShare; use PHPUnit\Framework\MockObject\MockObject; @@ -196,15 +196,9 @@ class PreviewControllerTest extends \Test\TestCase { ->with($this->equalTo($file)) ->willReturn(true); - $shareAttributes = $this->createMock(IAttributes::class); - $shareAttributes->expects(self::atLeastOnce()) - ->method('getAttribute') - ->with('permissions', 'download') - ->willReturn(false); - $share = $this->createMock(IShare::class); - $share->method('getAttributes') - ->willReturn($shareAttributes); + $share->method('canSeeContent') + ->willReturn(false); $storage = $this->createMock(ISharedStorage::class); $storage->method('instanceOfStorage') @@ -242,14 +236,9 @@ class PreviewControllerTest extends \Test\TestCase { ->with($this->equalTo($file)) ->willReturn(true); - $shareAttributes = $this->createMock(IAttributes::class); - $shareAttributes->method('getAttribute') - ->with('permissions', 'download') - ->willReturn(false); - $share = $this->createMock(IShare::class); - $share->method('getAttributes') - ->willReturn($shareAttributes); + $share->method('canSeeContent') + ->willReturn(false); $storage = $this->createMock(ISharedStorage::class); $storage->method('instanceOfStorage') @@ -341,8 +330,8 @@ class PreviewControllerTest extends \Test\TestCase { // No attributes set -> download permitted $share = $this->createMock(IShare::class); - $share->method('getAttributes') - ->willReturn(null); + $share->method('canSeeContent') + ->willReturn(true); $storage = $this->createMock(ISharedStorage::class); $storage->method('instanceOfStorage') diff --git a/tests/Core/Controller/UserControllerTest.php b/tests/Core/Controller/UserControllerTest.php index 979c723dd85..2473f280580 100644 --- a/tests/Core/Controller/UserControllerTest.php +++ b/tests/Core/Controller/UserControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/Core/Controller/WipeControllerTest.php b/tests/Core/Controller/WipeControllerTest.php index fa5f98988e7..5330eb599e6 100644 --- a/tests/Core/Controller/WipeControllerTest.php +++ b/tests/Core/Controller/WipeControllerTest.php @@ -47,9 +47,8 @@ class WipeControllerTest extends TestCase { * @param bool $valid * @param bool $couldPerform * @param bool $result - * - * @dataProvider dataTest */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTest')] public function testCheckWipe(bool $valid, bool $couldPerform, bool $result): void { if (!$valid) { $this->remoteWipe->method('start') @@ -76,9 +75,8 @@ class WipeControllerTest extends TestCase { * @param bool $valid * @param bool $couldPerform * @param bool $result - * - * @dataProvider dataTest */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTest')] public function testWipeDone(bool $valid, bool $couldPerform, bool $result): void { if (!$valid) { $this->remoteWipe->method('finish') diff --git a/tests/Core/Data/LoginFlowV2CredentialsTest.php b/tests/Core/Data/LoginFlowV2CredentialsTest.php index 41575f33a9c..ffa06f1a451 100644 --- a/tests/Core/Data/LoginFlowV2CredentialsTest.php +++ b/tests/Core/Data/LoginFlowV2CredentialsTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only @@ -11,7 +12,7 @@ use OC\Core\Data\LoginFlowV2Credentials; use Test\TestCase; class LoginFlowV2CredentialsTest extends TestCase { - /** @var \OC\Core\Data\LoginFlowV2Credentials */ + /** @var LoginFlowV2Credentials */ private $fixture; public function setUp(): void { diff --git a/tests/Core/Middleware/TwoFactorMiddlewareTest.php b/tests/Core/Middleware/TwoFactorMiddlewareTest.php index 2d778a740dc..10afdd7c5e1 100644 --- a/tests/Core/Middleware/TwoFactorMiddlewareTest.php +++ b/tests/Core/Middleware/TwoFactorMiddlewareTest.php @@ -243,9 +243,7 @@ class TwoFactorMiddlewareTest extends TestCase { ]; } - /** - * @dataProvider dataRequires2FASetupDone - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataRequires2FASetupDone')] public function testRequires2FASetupDone(bool $hasProvider, bool $missingProviders, bool $expectEception): void { if ($hasProvider) { $provider = $this->createMock(IProvider::class); diff --git a/tests/Core/Service/LoginFlowV2ServiceUnitTest.php b/tests/Core/Service/LoginFlowV2ServiceUnitTest.php index b2c6f5c3027..5d05a1c6e0a 100644 --- a/tests/Core/Service/LoginFlowV2ServiceUnitTest.php +++ b/tests/Core/Service/LoginFlowV2ServiceUnitTest.php @@ -31,25 +31,25 @@ use Test\TestCase; * Unit tests for \OC\Core\Service\LoginFlowV2Service */ class LoginFlowV2ServiceUnitTest extends TestCase { - /** @var \OCP\IConfig */ + /** @var IConfig */ private $config; - /** @var \OCP\Security\ICrypto */ + /** @var ICrypto */ private $crypto; /** @var LoggerInterface|MockObject */ private $logger; - /** @var \OC\Core\Db\LoginFlowV2Mapper */ + /** @var LoginFlowV2Mapper */ private $mapper; - /** @var \OCP\Security\ISecureRandom */ + /** @var ISecureRandom */ private $secureRandom; - /** @var \OC\Core\Service\LoginFlowV2Service */ + /** @var LoginFlowV2Service */ private $subjectUnderTest; - /** @var \OCP\AppFramework\Utility\ITimeFactory */ + /** @var ITimeFactory */ private $timeFactory; /** @var \OC\Authentication\Token\IProvider */ diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 8177b580965..3e50e6aef62 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/data/setUploadLimit/htaccess b/tests/data/setUploadLimit/htaccess index 53f743f45e7..06e2c7ec2e4 100644 --- a/tests/data/setUploadLimit/htaccess +++ b/tests/data/setUploadLimit/htaccess @@ -10,7 +10,6 @@ <IfModule mod_env.c> # Add security and privacy related headers Header set X-Content-Type-Options "nosniff" - Header set X-XSS-Protection "1; mode=block" Header set X-Robots-Tag "noindex, nofollow" Header set X-Frame-Options "SAMEORIGIN" SetEnv modHeadersAvailable true diff --git a/tests/databases-all-config.php b/tests/databases-all-config.php index bf5035fe6d5..210e75d3ab9 100644 --- a/tests/databases-all-config.php +++ b/tests/databases-all-config.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/enable_all.php b/tests/enable_all.php index f6d549dfd73..85e5f3b9247 100644 --- a/tests/enable_all.php +++ b/tests/enable_all.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2025 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2012-2016 ownCloud, Inc. diff --git a/tests/lib/Accounts/AccountManagerTest.php b/tests/lib/Accounts/AccountManagerTest.php index 6e2f30a2c26..2e1dc4ec70c 100644 --- a/tests/lib/Accounts/AccountManagerTest.php +++ b/tests/lib/Accounts/AccountManagerTest.php @@ -462,10 +462,7 @@ class AccountManagerTest extends TestCase { ->getMock(); } - /** - * @dataProvider dataTrueFalse - * - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTrueFalse')] public function testUpdateUser(array $newData, array $oldData, bool $insertNew, bool $updateExisting): void { $accountManager = $this->getInstance(['getUser', 'insertNewUser', 'updateExistingUser']); /** @var IUser $user */ @@ -684,9 +681,7 @@ class AccountManagerTest extends TestCase { ]; } - /** - * @dataProvider dataParsePhoneNumber - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataParsePhoneNumber')] public function testSanitizePhoneNumberOnUpdateAccount(string $phoneInput, string $defaultRegion, ?string $phoneNumber): void { $this->config->method('getSystemValueString') ->willReturn($defaultRegion); @@ -738,9 +733,7 @@ class AccountManagerTest extends TestCase { ]; } - /** - * @dataProvider dataSanitizeOnUpdate - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSanitizeOnUpdate')] public function testSanitizingOnUpdateAccount(string $property, string $input, ?string $output): void { if ($property === IAccountManager::PROPERTY_FEDIVERSE) { @@ -823,9 +816,7 @@ class AccountManagerTest extends TestCase { ]; } - /** - * @dataProvider dataSanitizeFediverseServer - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSanitizeFediverseServer')] public function testSanitizingFediverseServer(string $input, ?string $output, bool $hasInternet, ?string $serverResponse): void { $this->config->expects(self::once()) ->method('getSystemValueBool') @@ -882,9 +873,7 @@ class AccountManagerTest extends TestCase { } } - /** - * @dataProvider searchDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('searchDataProvider')] public function testSearchUsers(string $property, array $values, array $expected): void { $this->populateOrUpdate(); @@ -960,9 +949,7 @@ class AccountManagerTest extends TestCase { ]; } - /** - * @dataProvider dataCheckEmailVerification - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCheckEmailVerification')] public function testCheckEmailVerification(array $userData, ?string $newEmail): void { $user = $this->makeUser(...$userData); // Once because of getAccount, once because of getUser @@ -1027,9 +1014,7 @@ class AccountManagerTest extends TestCase { ]; } - /** - * @dataProvider dataSetDefaultPropertyScopes - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetDefaultPropertyScopes')] public function testSetDefaultPropertyScopes(array $propertyScopes, array $expectedResultScopes): void { $user = $this->makeUser('steve', 'Steve Smith', 'steve@steve.steve'); $this->config->expects($this->once())->method('getSystemValue')->with('account_manager.default_property_scope', [])->willReturn($propertyScopes); diff --git a/tests/lib/Accounts/AccountPropertyTest.php b/tests/lib/Accounts/AccountPropertyTest.php index 68e1da41557..b92e45176a3 100644 --- a/tests/lib/Accounts/AccountPropertyTest.php +++ b/tests/lib/Accounts/AccountPropertyTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -69,9 +70,7 @@ class AccountPropertyTest extends TestCase { ]; } - /** - * @dataProvider scopesProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('scopesProvider')] public function testSetScopeMapping(string $storedScope, ?string $returnedScope): void { if ($returnedScope === null) { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/lib/Accounts/AccountTest.php b/tests/lib/Accounts/AccountTest.php index 34653bd864a..514ff17e58e 100644 --- a/tests/lib/Accounts/AccountTest.php +++ b/tests/lib/Accounts/AccountTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Accounts/HooksTest.php b/tests/lib/Accounts/HooksTest.php index 73cef2e2c65..622fb3c7461 100644 --- a/tests/lib/Accounts/HooksTest.php +++ b/tests/lib/Accounts/HooksTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -43,7 +44,6 @@ class HooksTest extends TestCase { } /** - * @dataProvider dataTestChangeUserHook * * @param $params * @param $data @@ -51,6 +51,7 @@ class HooksTest extends TestCase { * @param $setDisplayName * @param $error */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestChangeUserHook')] public function testChangeUserHook($params, $data, $setEmail, $setDisplayName, $error): void { if ($error) { $this->accountManager->expects($this->never())->method('updateAccount'); diff --git a/tests/lib/Activity/ManagerTest.php b/tests/lib/Activity/ManagerTest.php index e895991bac7..db0bedce359 100644 --- a/tests/lib/Activity/ManagerTest.php +++ b/tests/lib/Activity/ManagerTest.php @@ -88,11 +88,11 @@ class ManagerTest extends TestCase { } /** - * @dataProvider getUserFromTokenThrowInvalidTokenData * * @param string $token * @param array $users */ + #[\PHPUnit\Framework\Attributes\DataProvider('getUserFromTokenThrowInvalidTokenData')] public function testGetUserFromTokenThrowInvalidToken($token, $users): void { $this->expectException(\UnexpectedValueException::class); @@ -109,12 +109,12 @@ class ManagerTest extends TestCase { } /** - * @dataProvider getUserFromTokenData * * @param string $userLoggedIn * @param string $token * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('getUserFromTokenData')] public function testGetUserFromToken($userLoggedIn, $token, $expected): void { if ($userLoggedIn !== null) { $this->mockUserSession($userLoggedIn); @@ -200,10 +200,10 @@ class ManagerTest extends TestCase { } /** - * @dataProvider dataPublish * @param string|null $author * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPublish')] public function testPublish($author, $expected): void { if ($author !== null) { $authorObject = $this->getMockBuilder(IUser::class) diff --git a/tests/lib/AllConfigTest.php b/tests/lib/AllConfigTest.php index 9d204754d96..80a38d590f4 100644 --- a/tests/lib/AllConfigTest.php +++ b/tests/lib/AllConfigTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -21,7 +22,7 @@ use OCP\PreConditionNotMetException; use OCP\Server; class AllConfigTest extends \Test\TestCase { - /** @var \OCP\IDBConnection */ + /** @var IDBConnection */ protected $connection; protected function getConfig($systemConfig = null, $connection = null) { @@ -44,8 +45,8 @@ class AllConfigTest extends \Test\TestCase { // preparation - add something to the database $this->connection->executeUpdate( - 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' . - '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', + 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' + . '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', ['userDelete', 'appDelete', 'keyDelete', 'valueDelete'] ); @@ -158,9 +159,9 @@ class AllConfigTest extends \Test\TestCase { } /** - * @dataProvider dataSetUserValueUnexpectedValue * @param mixed $value */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetUserValueUnexpectedValue')] public function testSetUserValueUnexpectedValue($value): void { $this->expectException(\UnexpectedValueException::class); @@ -254,8 +255,8 @@ class AllConfigTest extends \Test\TestCase { $connectionMock = $this->createMock(IDBConnection::class); $connectionMock->expects($this->once()) ->method('executeQuery') - ->with($this->equalTo('SELECT `configvalue` FROM `*PREFIX*preferences` ' . - 'WHERE `userid` = ? AND `appid` = ? AND `configkey` = ?'), + ->with($this->equalTo('SELECT `configvalue` FROM `*PREFIX*preferences` ' + . 'WHERE `userid` = ? AND `appid` = ? AND `configkey` = ?'), $this->equalTo(['userSetUnchanged', 'appSetUnchanged', 'keySetUnchanged'])) ->willReturn($resultMock); $connectionMock->expects($this->never()) @@ -319,8 +320,8 @@ class AllConfigTest extends \Test\TestCase { ]; foreach ($data as $entry) { $this->connection->executeUpdate( - 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' . - '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', + 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' + . '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', $entry ); } @@ -345,8 +346,8 @@ class AllConfigTest extends \Test\TestCase { ]; foreach ($data as $entry) { $this->connection->executeUpdate( - 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' . - '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', + 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' + . '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', $entry ); } @@ -383,8 +384,8 @@ class AllConfigTest extends \Test\TestCase { ]; foreach ($data as $entry) { $this->connection->executeUpdate( - 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' . - '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', + 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' + . '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', $entry ); } @@ -424,8 +425,8 @@ class AllConfigTest extends \Test\TestCase { ]; foreach ($data as $entry) { $this->connection->executeUpdate( - 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' . - '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', + 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' + . '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', $entry ); } @@ -458,8 +459,8 @@ class AllConfigTest extends \Test\TestCase { ]; foreach ($data as $entry) { $this->connection->executeUpdate( - 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' . - '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', + 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' + . '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', $entry ); } @@ -504,8 +505,8 @@ class AllConfigTest extends \Test\TestCase { ]; foreach ($data as $entry) { $this->connection->executeUpdate( - 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' . - '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', + 'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' + . '`configkey`, `configvalue`) VALUES (?, ?, ?, ?)', $entry ); } diff --git a/tests/lib/App/AppManagerTest.php b/tests/lib/App/AppManagerTest.php index 5cd141c16a9..6637c529a1e 100644 --- a/tests/lib/App/AppManagerTest.php +++ b/tests/lib/App/AppManagerTest.php @@ -139,9 +139,7 @@ class AppManagerTest extends TestCase { ); } - /** - * @dataProvider dataGetAppIcon - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetAppIcon')] public function testGetAppIcon($callback, ?bool $dark, ?string $expected): void { $this->urlGenerator->expects($this->atLeastOnce()) ->method('imagePath') @@ -310,10 +308,9 @@ class AppManagerTest extends TestCase { } /** - * @dataProvider dataEnableAppForGroupsAllowedTypes - * * @param array $appInfo */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataEnableAppForGroupsAllowedTypes')] public function testEnableAppForGroupsAllowedTypes(array $appInfo): void { $group1 = $this->createMock(IGroup::class); $group1->method('getGID') @@ -369,11 +366,11 @@ class AppManagerTest extends TestCase { } /** - * @dataProvider dataEnableAppForGroupsForbiddenTypes * * @param string $type * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataEnableAppForGroupsForbiddenTypes')] public function testEnableAppForGroupsForbiddenTypes($type): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('test can\'t be enabled for groups.'); @@ -776,9 +773,7 @@ class AppManagerTest extends TestCase { ]; } - /** - * @dataProvider isBackendRequiredDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('isBackendRequiredDataProvider')] public function testIsBackendRequired( string $backend, array $appBackends, diff --git a/tests/lib/App/AppStore/Bundles/BundleBase.php b/tests/lib/App/AppStore/Bundles/BundleBase.php index 28fb8a7736b..71acaa052b3 100644 --- a/tests/lib/App/AppStore/Bundles/BundleBase.php +++ b/tests/lib/App/AppStore/Bundles/BundleBase.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php index 225dd78a1b4..ab6f5502fde 100644 --- a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php +++ b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/App/AppStore/Bundles/EducationBundleTest.php b/tests/lib/App/AppStore/Bundles/EducationBundleTest.php index 50942d8df97..88a3b2d8d67 100644 --- a/tests/lib/App/AppStore/Bundles/EducationBundleTest.php +++ b/tests/lib/App/AppStore/Bundles/EducationBundleTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/App/AppStore/Bundles/EnterpriseBundleTest.php b/tests/lib/App/AppStore/Bundles/EnterpriseBundleTest.php index 464d48102b2..a02ee11d15c 100644 --- a/tests/lib/App/AppStore/Bundles/EnterpriseBundleTest.php +++ b/tests/lib/App/AppStore/Bundles/EnterpriseBundleTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/App/AppStore/Bundles/GroupwareBundleTest.php b/tests/lib/App/AppStore/Bundles/GroupwareBundleTest.php index 5ba9ee4c4e1..be756dbc55e 100644 --- a/tests/lib/App/AppStore/Bundles/GroupwareBundleTest.php +++ b/tests/lib/App/AppStore/Bundles/GroupwareBundleTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/App/AppStore/Bundles/SocialSharingBundleTest.php b/tests/lib/App/AppStore/Bundles/SocialSharingBundleTest.php index a2681cb0238..f3437fb51e6 100644 --- a/tests/lib/App/AppStore/Bundles/SocialSharingBundleTest.php +++ b/tests/lib/App/AppStore/Bundles/SocialSharingBundleTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php index 5a9c37af7fb..b9866396662 100644 --- a/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -71,9 +72,7 @@ class AppDiscoverFetcherTest extends FetcherBase { $this->assertEquals([], $this->fetcher->get()); } - /** - * @dataProvider dataGetETag - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetETag')] public function testGetEtag(?string $expected, bool $throws, string $content = ''): void { $folder = $this->createMock(ISimpleFolder::class); if (!$throws) { diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php index 0d311d8878a..a6dd801aca8 100644 --- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -45,13 +46,13 @@ class AppFetcherTest extends TestCase { [{"id":"direct_menu","categories":["customization"],"userDocs":"","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/juliushaertl/direct_menu/issues","website":"","created":"2016-10-01T09:16:06.030994Z","lastModified":"2016-10-06T14:01:05.584192Z","releases":[{"version":"0.9.2","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/juliushaertl/direct_menu/releases/download/v0.9.2/direct_menu.tar.gz","created":"2016-10-06T14:01:05.578297Z","licenses":["agpl"],"lastModified":"2016-10-06T14:01:05.643813Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"ERBS9G5bZ3vwCizz2Ht5DehsVJmb63bzF3aYcH7xjbDVMPagOFWdUAiLDwTeZR1n\ni4gdZ73J/IjHQQJoOPwtCjgbZgLPFqL5x13CLUO9mb/33dZe/+gqEDc/3AuJ4TlA\nXUdLxHRb1bwIlJOwuSr/E24452VG20WUhLXBoM0Zm7WcMxvJWo2zAWnuqnLX3dy9\ncPB4PX+6JU2lUMINj8OYQmM1QnqvjG8YV0cYHbBbnSicOGwXEnni7mojsC8T0cn7\nYEJ2O2iO9hh3fvFEXUzDcL7tDQ5bZqm63Oa991bsAJxFo/RbzeJRh//DcOrd8Ufn\nu2SqRhwybS8j4YvfjAL9RPdRfPLwf6X2gx/Y6QFrKHH0QMI/9J/ZFyoUQcqKbsHV\n85O+yuWoqVmza71tkp4n9PuMdprCinaVvHbHbNGUf2SIh9BWuEQuVvvnvB+ZW8XY\n+Cl+unzk3WgOgT0iY3uEmsQcrLIo4DSKhcNgD1NS13fR/JTSavvmOqBarUMFZfVC\nbkR1DTBCyDjdpNBidpa3/26675dz5IT5Zedp4BBBREQzX08cIhJx5mgqDdX3CU09\nuWtzoaLi71/1BWTFAN+Y9VyfZ8/Z3Pg3vKedRJ565mztIj0geL3riEsC5YnPS0+C\n+a3B9sDiiOa101EORzX3lrPqL7reEPdCxrIwN+hKFBQ=","translations":{}}],"screenshots":[{"url":"https://bitgrid.net/~jus/direct_menu_nc.png"}],"translations":{"en":{"name":"Direct Menu","summary":"Provide easy access to all apps in the header.","description":"Provide easy access to all apps in the header."}},"isFeatured":false,"authors":[{"name":"Julius Hรคrtl","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEBjCCAu4CAhADMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYwOTE0MTI1MDU0WhcNMjYxMjIxMTI1MDU0WjAWMRQwEgYD\r\nVQQDDAtkaXJlY3RfbWVudTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB\r\nAMkzWsAkKP/40ktvJMpnr0IJNVoPOR0hvh24igcDskL1WKiD2eiRUenj5LE0Nvn+\r\nsiGmWsAqRVpdiz+Y8ghQqQMzKi43IrRN0AxlCrHWrSqBZT3wIAUcFz4RzEoFxc1N\r\nUZzWma6ljukGnvt4V1ZyT+H/cjqxUkBhh/y9SS0jUen1a1grND6Rw54X46V2dlCu\r\nFH+pLsfPJJGw+QLeTGHn7dqdv18cYMAlWDCzPixVnNiCXHZcUtKMmstU2xU4R2e6\r\nzimp2rgkE4TNHrafpjH8xGdNi2FG5Dmokob/L5Q2r8jyNaW7UsFfrvLTRj371b3/\r\n2FhhxoGUvDzaG2An02Exwm52LJfdTVMHAMPZub5poHfy5vAEdZGPQ/m02l8ZK/Y2\r\n7yT807GlfPMXfdfjCxR6wNtmv7rvBDdrUZmIRNJfpFSdvlH/+MOTWnabyfQv2K4Q\r\nBIwltX6Elh0lh4ntvt1ZVtvFv+PL1Dc7QLV+w19+/LJA0mnsh7GIFYKFlbA65gA0\r\nc/w+uqDy0+5MxkR9WGPpd79KRA1tKWTis4Ny1lApK5y3zIsVGa3DfBHXcwqkWHbV\r\nwIpyuyyDsFtC1b9LTFONX7iU9cbNk5C5GTM331MdA2kLcD/D5k42GNTBSca7MkPx\r\nFx/ETSn0Ct167el30symf2AxvXjw+mBYPN71rVTMDwe9AgMBAAEwDQYJKoZIhvcN\r\nAQELBQADggEBAC0fJKnbEhXA8M283jA9GxABxLyTBcQyVVNnz2L/bYYNi81Y9iZv\r\n+U0S3qaIfoqNcV9FTKAutbsKvWyolnI7MRRK6feNuFfoP2jKubM1CnawpyT/RF2Q\r\ne/zxnB1EmeI2X5D2xceJDLB7Fy5W0EGrLixRIdFaSUommWFUm9E2hSIaNlziSBdc\r\n1J/mOQeNYO5zg5ouEt1rzQW4Mhh1I2uNQmGe4ip+Jl/2LAv3FZuu4NrSEcoXH3ro\r\nG2dF9Gtu4GiQ5fuaJknaxlgXHovfqeZwZJX9o4M+Ug81AqiY7XjdiaCPdh0Tthcx\r\n2OmWZo7UBREWenjKyFZZ/iKoqH5sdenBtpo=\r\n-----END CERTIFICATE-----"},{"id":"apporder","categories":["customization"],"userDocs":"","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/juliushaertl/apporder/issues","website":"","created":"2016-10-01T09:16:47.111889Z","lastModified":"2016-10-12T19:50:16.038821Z","releases":[{"version":"0.3.3","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/juliushaertl/apporder/releases/download/0.3.3/apporder.tar.gz","created":"2016-10-12T19:14:10.802359Z","licenses":["agpl"],"lastModified":"2016-10-12T19:50:16.104357Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"nhlT9lhrmBxIsqh/e3RLm2NDw/U8ZvvoMyYQTLMM3H19DQmVcPYPYC9QWVTsowUzXblVaOXVGylbpKma9yOlOAqJtF3qyXecLl4+tA/Awb6BBhKPgHFdcLDAL5yy1K7/uei3SgEojMlJoI9vEK5I1C5YTh43yNH+//Im6MAuNYFUTlMXK426zdOe6ogpCI5GlYdXopqYANxcpT+WXWET6DDSM5Ev+MYwMcSAY4r8+tvARRU4ZAenRgjkBT6R5z6cD76emRax14tbV6vkjjwRcO+dQtM0tFPbd+5fsNInbauv50VzIMgjA6RnKTOI17gRsSdGlsV4vZn2aIxEPWauu6T/UohMvAE9HMn13vtbpPBSFwJAktj6yHASYGzupNQLprA0+OdyALoLZPpQAKNEXA42a4EVISBKu0EmduHJlUPeqhnIGkkGgVNWS8AWqzP2nFoPdXBgUWateiMcBTHxgEKDac5YmNc9lsXpzf1OxBaXHBhGYKuXPwIfyH3jTWb1OdwixJEuRe9dl63T9qOTRre8QWns/bMqKLibGfMtFhVB21ARJayBuX70eVvabG/2N7Y5t1zUlFygIKu51tvo3AVCRDdRrFWDvkAjxzIz5FIdALVZ+DReFYu/r4WF/w3V9rInFuEDSwb/OH4r8sQycs07tSlMyA74Y3FpjKTBxso=","translations":{}},{"version":"0.3.2","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/juliushaertl/apporder/releases/download/0.3.2/apporder.tar.gz","created":"2016-10-06T14:00:51.532409Z","licenses":["agpl"],"lastModified":"2016-10-06T14:00:51.598455Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"gRVFOtj9414ZNSdRH/qNB2SwVZUQh+gaFnNLFjjXjJ1MdRMCISzvwb+QU1qYuK/y\nuL8K0pn1+fFQf8A3VsC2pb6yaLQ5U9C3Guf886Flf4qtYw1P8UWRA9yOJ+6Md+PH\n6pTEiDIdm4xbmM0KkBhsE5kL8dvLIq4EwwcAh2Qq8fjytzAk1YiP+KrTaYrVwskM\nDmm0lgP4NVnjRBTX9myW6tr6N3w0tq2jJ/+a/vEDJv+5ozKJx8N5gbJNdrtI4k7I\nyaQNWJ7cngtAHmUREeoBggV5uJayDceu83PPQR6N9/WVyNyZjw1Q8/Q6e/NyiXT2\no8mGv5tHl3DBOVuv8v7gBQgDh6ppp12M81aiCZymn2XIgjw50VQ+K15KHnLHuFFw\nwuHZVcoQ7b6oR4K4TURSfPFUeNgGS4R9v6gjg1RUcSm1Pnryc6pYnh10AUY8dk6q\n1CZ6Upt6SScP2ZEGWsFwVjjQhY/ZJmNfnhaGoFOZ5L9CnzyNCkGXFg0rL36i6djb\naqFy/z+Brnklng5ct6XWoP7uDt5BaHznQj1NHSfHn0GUQ0N968zWm9vQvy+dyXyC\nxR7vKeu2ppZ2ydoeQ9CVwfhOEsGs5OvrpapQdh9KbUHcX7b7ql01J7/P6dFuNuHe\n+7/y4ex3sEVg5YBmDtF8iZ6d7zsHd6peL1s1EsLnenQ=","translations":{}}],"screenshots":[{"url":"https://bitgrid.net/~jus/apporder-nc.gif"}],"translations":{"en":{"name":"AppOrder","summary":"Sort apps in the menu with drag and drop","description":"\nEnable sorting for icons inside the app menu. The order will be saved for each\nuser individually. Administrators can define a custom default order.\nAppOrder works with the default owncloud menu as well as with the direct_menu\napp.\n\n## Set a default order for all new users\n\nGo to the Admin settings > Additional settings and drag the icons under App order.\n\n## Use first app as default app\n\nYou can easily let Nextcloud redirect your user to the first app in their\npersonal order by changing the following parameter in your config/config.php:\n\n'defaultapp' => 'apporder',\n\nUsers will now get redirected to the first app of the default order or to the\nfirst app of the user order.\n "}},"isFeatured":false,"authors":[{"name":"Julius Hรคrtl","mail":"jus@bitgrid.net","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEAzCCAusCAhAEMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYwOTE0MTI1MjQ4WhcNMjYxMjIxMTI1MjQ4WjATMREwDwYD\r\nVQQDDAhhcHBvcmRlcjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKVK\r\nKn5jivCu+eRfe5BECjDOzNaGHlpiegb49Hf4nh0W7DqcoLHip5c1O2BcEYdH6rkw\r\n20WclvjoQpgavG5aFXzXzur6eKTT5TpgY5oZTLoWjbx4e+fKdhyDPTpqNZzs1pxz\r\nsZLDL/ElpbSErE0s+QK/pzP11WNPylAkI9AKSyDMO3Mbllg8I8Bt+bT7LJKYOO/T\r\nLhv9m0anLZ4HrdfimhVIoMiu3RpyRigk8titXZA94+F8Fbf7ZQ9f14Y/v3+rfJFQ\r\nii9cDoox5uUrjplH2LrMr5BodfCfydLu4uVpPWYkdccgvcZ1sugjvNXyCQgdzQDK\r\npOpiwVkkiQFaQJYbGSDblFWPl/cLtA/P/qS7s8tWyTQuc1rYlEpCHG/fG8ZFkSVK\r\n9eCMGxK908VB4IU2DHZHOHi7JvtOz8X/Ak6pIIFdARoW3rfKlrz6DD4T9jEgYq0n\r\nRe7YwCKEIU3liZJ+qG6LCa+rMlp/7sCzAmqBhaaaJyX4nnZCa2Q2cNZpItEAdwVc\r\nqxLYL1FiNFMSeeYhzJJoq5iMC3vp2LScUJJNoXZj9zv+uqTNGHr+bimchR2rHUBo\r\nPzDLFJmat03KdWcMYxcK5mxJNGHpgyqM7gySlbppY/cgAospE8/ygU2FlFWIC9N0\r\neDaY+T8QA1msnzsfMhYuOI8CRYigan1agGOMDgGxAgMBAAEwDQYJKoZIhvcNAQEL\r\nBQADggEBAGsECd+meXHg1rr8Wb6qrkDz/uxkY1J+pa5WxnkVcB6QrF3+HDtLMvYm\r\nTTS02ffLLyATNTOALZFSy4fh4At4SrNzl8dUaapgqk1T8f+y1FhfpZrEBsarrq+2\r\nCSKtBro2jcnxzI3BvHdQcx4RAGo8sUzaqKBmsy+JmAqpCSk8f1zHR94x4Akp7n44\r\n8Ha7u1GcHMPzSeScRMGJX/x06B45cLVGHH5GF2Bu/8JaCSEAsgETCMkc/XFMYrRd\r\nTu+WGOL2Ee5U4k4XFdzeSLODWby08iU+Gx3bXTR6WIvXCYeIVsCPKK/luvfGkiSR\r\nCpW1GUIA1cyulT4uyHf9g6BMdYVOsFQ=\r\n-----END CERTIFICATE-----"},{"id":"twofactor_totp","categories":["tools"],"userDocs":"","adminDocs":"","developerDocs":"","issueTracker":"","website":"","created":"2016-10-08T14:13:54.356716Z","lastModified":"2016-10-12T14:38:56.186269Z","releases":[{"version":"0.4.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.4.0 <7.1.0","platformVersionSpec":">=10.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/ChristophWurst/twofactor_totp/releases/download/0.4.1/twofactor_totp.tar.gz","created":"2016-10-12T14:38:56.174612Z","licenses":["agpl"],"lastModified":"2016-10-12T14:38:56.248223Z","isNightly":false,"rawPhpVersionSpec":">=5.4 <=7.0","rawPlatformVersionSpec":">=10 <=11","signature":"bnwWxmHEn8xkoWbtwhC1kIrJ0dQfAI3PUtU62k+Tru/BHt1G2aVxqO8bCdghojZ7\nzdFMlIJw4kekYFsVfLk8jzjUTZKVbNVKCdkHrVTQ0bUUryMAMLqGQ3PSRI5NX6D5\nFpkvwO1coYwU0XVWF8KAS0meX0ztSkT3Mv96LLrxr8F8SrB/MGmKIE4WTjt1fAIa\nZLAVEUo/3sNFTGLYBtL3wjctrkZvJltP8abeRfls9FkRHu+rN7R3uLFzk42uZn3X\nWpt5BBmlYm5ORbnJ2ApsxEkMNK+rOy8GIePaz5277ozTNrOnO04id1FXnS9mIsKD\n20nRzjekZH+nneQYoCTfnEFg2QXpW+a+zINbqCD5hivEU8utdpDAHFpNjIJdjXcS\n8MiCA/yvtwRnfqJ5Fy9BxJ6Gt05/GPUqT8DS7P1I1N+qxhsvFEdxhrm2yIOhif8o\nh7ro5ls+d3OQ8i3i4vdZm821Ytxdu/DQBHiVoOBarvFWwWAv2zd2VAvpTmk6J5yv\n3y+csRqpEJYd9fcVMPsTu7WBRRrpBsAqdAHJcZEwak2kz1kdOgSf8FIzP1z6Q71d\nMl2RKcPeutMHHSLiGIN/h7fM5aSs49wGgGZmfz28fHVd7/U0HFSMYmkT/GMq5tMP\nIyc+QZAN4qbX8G0k/QSTkK/L4lOT2hQiQqiSqmWItMk=","translations":{}}],"screenshots":[],"translations":{"en":{"name":"Two Factor TOTP Provider","summary":"A Two-Factor-Auth Provider for TOTP (e.g. Google Authenticator)","description":"A Two-Factor-Auth Provider for TOTP (e.g. Google Authenticator)"}},"isFeatured":true,"authors":[{"name":"Christoph Wurst","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIECTCCAvECAhASMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYxMDEyMDkzNDMxWhcNMjcwMTE4MDkzNDMxWjAZMRcwFQYD\r\nVQQDDA50d29mYWN0b3JfdG90cDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC\r\nggIBALC1K94104L/nOtmTygx7QNjUcnHs3yrn71mw4pMxTlonXOnMTpwxsfL1Hhu\r\n/5GMSgupTbQPlevSl6J86UMs455/sPShd6ifmAuhb8VFaAsjpizjs0RMaUg1sjmF\r\nuV18PD9FXLourx51V/c4MG5kpavlV+bLUrVMAjbsJY2+k30tCC/XkP5u8jUWmM/T\r\n5REChn7/obPgaeddhuJoILYhKEW3VNrR8Fm9SYiviB3FLhM7URDZ97IBnXYqbvbT\r\nZnvq+E74Zc7HgYwQwrjU/AqQAInhNpAR4ZM6CkWWWWaL96O1q3lCfKJNaxqC0Kg/\r\nkGn/pxYkl9062jtMUz60s9OPDyuisfyl68UyM68Ozyz4SMRLmDVbewOqQAwmAbtz\r\n8p9AQrX3Pr9tXhARR4pDSsQz1z+8ExEd6EKbhMyiTtHtZQ1Vm9qfoR52snpznb5N\r\ne4TcT2qHAkOWV9+a9ESXmQz2bNjgThxEl5edTVY9m4t248lK5aBTGq5ZKGULNHSQ\r\nGGpr/ftMFpII45tSvadexUvzcR/BHt3QwBAlPmA4rWtjmOMuJGDGk+mKw4pUgtT8\r\nKvUMPQpnrbXSjKctxb3V5Ppg0UGntlSG71aVdxY1raLvKSmYeoMxUTnNeS6UYAF6\r\nI3FiuPnrjVFsZa2gwZfG8NmUPVPdv1O/IvLbToXvyieo8MbZAgMBAAEwDQYJKoZI\r\nhvcNAQELBQADggEBAEb6ajdng0bnNRuqL/GbmDC2hyy3exqPoZB/P5u0nZZzDZ18\r\nLFgiWr8DOYvS+9i6kdwWscMwNJsLEUQ2rdrAi+fGr6dlazn3sCCXrskLURKn5qCU\r\nfIFZbr2bGjSg93JGnvNorfsdJkwpFW2Z9gOwMwa9tAzSkR9CsSdOeYrmdtBdodAR\r\ndIu2MkhxAZk9FZfnFkjTaAXcBHafJce7H/IEjHDEoIkFp5KnAQLHsJb4n8JeXmi9\r\nVMgQ6yUWNuzOQMZpMIV7RMOUZHvxiX/ZWUFzXNYX0GYub6p4O2uh3LJE+xXyDf77\r\nRBO7PLY3m4TXCeKesxZlkoGke+lnq7B8tkADdPI=\r\n-----END CERTIFICATE-----"},{"id":"contacts","categories":["office","organization","social"],"userDocs":"https://docs.nextcloud.com/server/11/user_manual/pim/contacts.html","adminDocs":"https://docs.nextcloud.com/server/11/admin_manual/configuration_server/occ_command.html?highlight=occ%20commands#dav-label","developerDocs":"https://github.com/nextcloud/contacts#building-the-app","issueTracker":"https://github.com/nextcloud/contacts/issues","website":"https://github.com/nextcloud/contacts#readme","created":"2016-10-30T14:00:58.922766Z","lastModified":"2016-11-22T22:08:01.904319Z","releases":[{"version":"1.5.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/contacts/releases/download/v1.5.0/contacts.tar.gz","created":"2016-11-22T22:08:01.861942Z","licenses":["agpl"],"lastModified":"2016-11-22T22:08:02.306939Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"ZqqhqtbHcNB+rzGCQ7FDIjjvHjit+dhAE1UhFgiXApkx3tmPP4nJOBAGNjHe+2Ao\nVcTIX2SrWEfieRrA4Gp+0k7pUPWag1Z0T1OVOwO4cmS1AVFyGIOE1bRvDhMfsWTU\n4CI4oXaKBFAY6mtnf7VJ7EeIdNqhImkohyWDQ88NiPRLM1XNkJJk6AvZBcT0fvCv\no145X4dLpbixSXsN99QFNJ/oXvK+9tBGwTd5i/WnNFY90vcNRLia8aRo7SA0YJRx\nLnxnj2HMqwTTDQEKE+1elYKWsqQ2DeqwScP97UIKe5bZXnrwOi9kH9PDmR4abtzd\nlHL8E1Wgw25ePDeHG7APrx0tVOJy1bP+g8vcarpGynWZoizDkBvYZD+xtxizpBXC\nJsDOSzczApptY6dnOtv0Vat8oh/Z/F99gBUahEu4WZ16ZgR1nj40PDK1Snl18Cgk\nMe1EZcde8SLEpTbCWYIfIw/O9Fkp5cWD/dAqoiO6g+gNxSZ/gGp57qoGfFxn7d/x\nH3aH8GljatAFjrwItw1JzR0THt0ukkOK+bw/pfCslk10sjHMitmz/GXa4qMS91DZ\nBKLUd0dSfQUQzkfwcojImbzJRvca4/DYe3mfG7+RCH0tDL6t72dKL9joB++u5R1u\nVZPgkToexlXcKWpiDB8H2/SEShKr4udAOjR5de9CYWM=","translations":{}}],"screenshots":[{"url":"https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Contacts/contacts.png"}],"translations":{"en":{"name":"Contacts","summary":"The new and improved app for your Contacts.","description":"The new and improved app for your Contacts."}},"isFeatured":true,"authors":[{"name":"Alexander Weidinger","mail":"","homepage":""},{"name":"Jan-Christoph Borchardt","mail":"","homepage":""},{"name":"Hendrik Leppelsack","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEAzCCAusCAhATMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYxMDEyMjAzNzIyWhcNMjcwMTE4MjAzNzIyWjATMREwDwYD\r\nVQQDDAhjb250YWN0czCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANzx\r\n/zJF+5/s4lOJLWIlfKQgTy+UpvIpiUXCgrsHsDZTx+hjQAhIWukH88a+7NVAL7Ys\r\nkQNC0Tlm755FJi/T6EdR7edOwIRdo2ZwakOWLZXd209+6cCd2UloHL0bgnbWepTl\r\nR/4YgbLg/G+FVKCfkEiYc3PuDZ3EVrcwQFcg7h74X9ne6CHH0Z1WQLydxJuVEb2n\r\nX9I+nIRpPHcVostkSiUmzHR7C5TjTIo2PzzgnCU6GC0iBa6z6dDYfz24QEp/b8UA\r\nZaLhjkyKghVGMnoF/s9KPgH4NM8pvvtadQN8pxlOPju4wbmKPUrsXo4ujurDXbbc\r\nYkzNt8ojobGwdTXoyDogAsGZLQd2FQksWpRvY+I3zVPokBfPMdUPLllG5VcV0VA5\r\nDRK+h2ms+XmspdBvGonjF+XdbFm9hEmDoFmoi9aU6C6AdofjmG/e9+pw/20dXUWk\r\nmMorWwXQ5yLmIn5LnpRXrOuK7CS28VRhBYuVNMlsyKhzU0rophbsD9OFXxYLjr6s\r\n7UPNwZ5h+kjXZDBKD89QctBSViT8RhLe8nulRIm0iJn1sb9hca/CF63KmsFzENfK\r\nQeM6MO0H34PB84iNyz5AX1OIy+1wHD4Wrzt9O/i2LkWK6tBhL69aZiBqdLXWKffj\r\nARDCxxIfews51EZFyHzwsw65I97y46aBKxY382q7AgMBAAEwDQYJKoZIhvcNAQEL\r\nBQADggEBACLypX0spxAVAwQIS9dlC9bh1X/XdW2nAvSju2taUTBzbp074SnW6niI\r\nbnY4ihYs4yOuGvzXxnp/OlvWH7qhOIchJUq/XPcEFMa7P03XjVpcNnD3k0zQWlZb\r\ntGonX9EUOeLZKdqI4fkrCkMLScfjgJzoHGYQrm8vlIg0IVuRLCKd5+x4bS7KagbG\r\niuPit2pjkw3nWz0JRHneRXz/BNoAWBnJiV7JMF2xwBAHN4ghTM8NSJzrGTurmpMI\r\nGld7yCP47xNPaAZEC66odcClvNtJ2Clgp8739jD6uJJCqcKDejeef0VU1PG7AXId\r\n52bVrGMxJwOuL1393vKxGH0PHDzcB1M=\r\n-----END CERTIFICATE-----"},{"id":"mail","categories":["tools"],"userDocs":"","adminDocs":"https://github.com/nextcloud/mail#readme","developerDocs":"","issueTracker":"","website":"","created":"2016-10-19T19:41:41.710285Z","lastModified":"2016-10-19T19:57:33.689238Z","releases":[{"version":"0.6.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.4.0 <7.1.0","platformVersionSpec":">=10.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/mail/releases/download/v0.6.0/mail.tar.gz","created":"2016-10-19T19:57:33.676730Z","licenses":["agpl"],"lastModified":"2016-10-19T19:57:33.834580Z","isNightly":false,"rawPhpVersionSpec":">=5.4 <=7.0","rawPlatformVersionSpec":">=10 <=11","signature":"VbMsvDpt+gSPeFM8LrZXEK10rk8kkLlgCcblgqNdCSeGZeVpwDAYv3CccVSLa0+l\nlTSqQ0VIoH+OIU6vIQNBKHmSCzTplk7OrY0+L5FajXx8LnBaOh892GfGSlEt1neN\nKyM0i0uOjO/xpCP/NoUlgkz6hnmYY5XEdN6DTsJtJ/XZhDQ45IYuIkMkHE/eFehS\n0JnOagIz+PSipeBY2Ry+tV8YbRa7bC1JAvZzlod0dyI015AHZESeitRUY+MwMWkt\nN/me7g7/Kev0wggIQQZm9aYcw63GMk/1VHUPB7Y0ESW9tx2nR5+KwTDn/Jy4DGf1\nrg8h0t5I+aPhHOBLrpczH0qaZWY2lsVZWq8KWjJI9aR9P0v2f2aXixXzD/Cuz1cK\nhvhKWkOSla4D+/FxeyHGjQvdXMG8gXm0ZmTimKChCoVuCbncDd8pzkdyNoGXcvuk\nsP8OrkQFooL4E7S4BWfdSiN/a8jUITJQkuXp/OVrVGeCupLWJh7qegUw6DvoqyGy\nD4c6b+qYn68kx3CLaPPiz+tFAZQZQdj7+Kx/lohso8yTnVSiGYrMj4IvvCbpsQjg\nWF3WSqF/K/tTnPYTWb9NUPSihTbVNv6AXOfTsPEp/ba2YSS5DjvjVjkr5vhR9eg1\nikQ3Cw6lW3vaA4LVCC+hFkMRnI4N0bo5qQavP3PnZPc=","translations":{"en":{"changelog":"### Added\n- Alias support\n [#1523](https://github.com/owncloud/mail/pull/1523) @tahaalibra\n- New incoming messages are prefetched\n [#1631](https://github.com/owncloud/mail/pull/1631) @ChristophWurst\n- Custom app folder support\n [#1627](https://github.com/owncloud/mail/pull/1627) @juliushaertl\n- Improved search\n [#1609](https://github.com/owncloud/mail/pull/1609) @ChristophWurst\n- Scroll to refresh\n [#1595](https://github.com/owncloud/mail/pull/1593) @ChristophWurst\n- Shortcuts to star and mark messages as unread\n [#1590](https://github.com/owncloud/mail/pull/1590) @ChristophWurst\n- Shortcuts to select previous/next messsage\n [#1557](https://github.com/owncloud/mail/pull/1557) @ChristophWurst\n\n## Changed\n- Minimum server is Nextcloud 10/ownCloud 9.1\n [#84](https://github.com/nextcloud/mail/pull/84) @ChristophWurst\n- Use session storage instead of local storage for client-side cache\n [#1612](https://github.com/owncloud/mail/pull/1612) @ChristophWurst\n- When deleting the current message, the next one is selected immediatelly\n [#1585](https://github.com/owncloud/mail/pull/1585) @ChristophWurst\n\n## Fixed\n- Client error while composing a new message\n [#1609](https://github.com/owncloud/mail/pull/1609) @ChristophWurst\n- Delay app start until page has finished loading\n [#1634](https://github.com/owncloud/mail/pull/1634) @ChristophWurst\n- Auto-redirection of HTML mail links\n [#1603](https://github.com/owncloud/mail/pull/1603) @ChristophWurst\n- Update folder counters when reading/deleting messages\n [#1585](https://github.com/owncloud/mail/pull/1585)"}}}],"screenshots":[],"translations":{"en":{"name":"Mail","summary":"Easy to use email client which connects to your mail server via IMAP and SMTP.","description":"Easy to use email client which connects to your mail server via IMAP and SMTP."}},"isFeatured":false,"authors":[{"name":"Christoph Wurst, Thomas Mรผller, Jan-Christoph Borchardt, Steffen Lindner & many more โฆ","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIID/zCCAucCAhAVMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYxMDE5MTkzMDM0WhcNMjcwMTI1MTkzMDM0WjAPMQ0wCwYD\nVQQDDARtYWlsMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp++RuliQ\nlBeeiPtP0ecBn00OaU1UCpft/NVI5pnSiT9nU4l2kc5IvKjA8UxDB3gWfYTOeBFh\ntUHQ2P6UKCmHZT9sApHhqLu2n0V+YhlFIViuaxndSID/M414cl56xOYQusV3Pcae\no2dOSeRRzLab3tEaVHlkBSFkGmAwPZItsmTklvV3h1sUysDicYgfXPCkf7K+JgWA\nBP7vsWC8B7MDRhcB3enYv5tTcpsyvtGX7bb1oTIWVypcmKsGYfTX12VNBxKzNBIG\n8pwdb8Xo0o14TytWsWN7mSHf1XbwfwYMjDWOlMqiRc+mcoKMBH41TfM/CXslSivI\nsyvxasEaFdlj8lmKPENdzw1OfYRs43usIf4szwyt4rb8ocXfDipnY3P2hccN6YcZ\nl8y8Vsr69ASluDj2A2Pl5vH6xp6tNybZRnN5G6sghhaYaLNDU/TdMyYzz4AY33Ra\nHSaMypfcXjd76Aj8jZvcwk1BH+ZsvFqNK7ZKCb7WVcMH8KRcU1sxZ4rp9vviM2fL\nL7EVtznm3bSI9jjHXbiwq7RvNRRy+F6YRpAdWGwTU8uUkDabPFi41FikYyzNWauK\nJhlDJXl514XjKyMVBjAZYVr5gZZkO1J7C4XzLFbC5UzYNSzW5Iwx/1j5OeYJRxh6\n5rhiUwR+COT1wdVsl6khMC8MfBR4unSd338CAwEAATANBgkqhkiG9w0BAQsFAAOC\nAQEATBvpqz75PUOFPy7Tsj9bJPaKOlvBSklHH7s43fDDmQbJwswXarZi3gNdKf8D\nyO/ACZvO8ANWAWL/WahkOyQtKOYzffaABGcEIP7636jzBdKtgwSGzW3fMwDghG10\nqBr2dE6ruOEdSpuZxgMgh2EulgknZUXaHAMI2HjjtAMOBScLQVjOgUqiOHmICrXy\nZETmzhx0BXDt5enJYs8R2KMYJNIme1easQRYmWKliXogNY09W7ifT9FHtVW1HX+K\nxRS4JXbapjolkxyGSpP+iYSgItVnYzl6o9KZResR4yDsBv7G/8fpV4GQU9IS3zLD\nPiZOosVHWJdpUKCw9V4P1prGTQ==\n-----END CERTIFICATE-----"},{"id":"audioplayer","categories":["multimedia"],"userDocs":"https://github.com/rello/audioplayer/wiki#user-documentation","adminDocs":"https://github.com/rello/audioplayer/wiki#admin-documentation","developerDocs":"","issueTracker":"https://github.com/rello/audioplayer/issues","website":"https://github.com/rello/audioplayer","created":"2016-09-16T05:44:24.857567Z","lastModified":"2016-11-17T22:34:34.637028Z","releases":[{"version":"1.3.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.4.0","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/Rello/audioplayer/releases/download/1.3.1/audioplayer-1.3.1.tar.gz","created":"2016-11-17T22:34:34.215350Z","licenses":["agpl"],"lastModified":"2016-11-17T22:34:34.867778Z","isNightly":false,"rawPhpVersionSpec":">=5.4","rawPlatformVersionSpec":">=9 <=11","signature":"p6Zz0IEFrxvw6y/3jHgGWWCxR6qpMzvU2HKfxcIVsK6sJnoRUhWLeAXwZ432fH2a S2llj+IGS9OvW+5VQElrXgPtEjDK1BT00DRJnp5RFCRlUv0LNoedJMzx6B6AHqPP JBufk3cG1O/CO0M0L1ITGSmSOzfKvWTRo3lxVGF792NyBaP/SyZCkH1N1TzBQzUi Ywl3+HiglPcXbHjtJm/arnKorbJWVKoaN93xFuaBapd2ozQSpi0fE0uGRsici+U7 HNa1M5WFE1rzUJoufE0E9246At07rFY1e+TdNEq8IlLgCXg5vGCKkEyuWpWno6aX LfRaIiT9x39UTAwNvuDKS0c+n4uWDYPsGfKhDx9N7CXpUrthfXVEWRzZEXG7as10 6ANvrRPJemSZH8FUSrdJhD7k12qa9R825y7mIG68Li8P71V92EOxFfo9tNXqXwBt VuDGxBqByFVPqSCj5I8hrzJzQl2Xt40g8+8ZcSF96RMg/pM+bwRMTv+mz0V+vQQ4 DWjqnWVPalaJ1PPD5/QFFErtXuNRbyxKZ6BMWxfJlLM9Kz66P75K+8fYaSwz+2KG NxY7I3svzS2K9LGH3fBLUy1t3Hl+c3zGFq/ll1MJrf9NswV4yxt2WmISfM/KDww8 yELkGs2cRzbw2tCvnmYlJJhIqRLkyFAbDzWRH/XdVx4=","translations":{"en":{"changelog":"2016-11-17\n- fix: one-click-play for wav not working\n- fix: wrong sql statement for PostgreSQL [#90](https://github.com/rello/audioplayer/issues/90)"}}},{"version":"1.3.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.4.0","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/Rello/audioplayer/releases/download/1.3.0/audioplayer-1.3.0.tar.gz","created":"2016-11-15T18:11:19.539636Z","licenses":["agpl"],"lastModified":"2016-11-15T18:11:19.592881Z","isNightly":false,"rawPhpVersionSpec":">=5.4","rawPlatformVersionSpec":">=9 <=11","signature":"lbp7wd3JhMHW5mC8kVnQFvcwzf3aTIhYhq3ak/C/vfDXJDIPFuQ1odVRWtaHXEKQ XmKYIoTobV1TAU5q9G0O0Kds73T/XtHG4ATLxMZE8RsUWNSj5v3H4YDub6A0uoX6 rzyLEYV6SGEtdPFMwLcUjDExKpzAzKpgxcd9uyz2NhcHJEO8FJmirn34bm69//TO vjjiMW4zpL+dho+7LQbOX+L1SmwmdBqwypE9zzeuIuhUWDEQtImHAvjIO6Temajm lX0H5JaowJa8kvP6Jkh3KAvsHQ4sJklvWTPGcv0gboN+o6CmjWNOb+3LeSH0nhe6 BmiPloUDJcPQwq2gQejH2pY+qJEdRcULSKS09/dRbE3gOSlG36FThN0INpv6uNP4 qVIiYs3/SEHMmlS5CHvJDt2S2XN9LT9IX7QPeuS/0CMcuopaG/+cdC4KscVCq4D4 bllgew9asiBqix8iV8C4oerYOiC5vWcgBrZhGShoJT1Qq+NKz+H10dFgjFCAZuPj nVagJkbXmf2NdcvpSC7qsufhyEZyCSp+I7QEYsbo1PW3aUU35Syt47lgeVFX0hVQ jC1wMIhEW5Rm2nCkRSZkRupKDQ+N6uWuB0lykeMV2ShcDvvUZrhN3c49sooWgigB yIqKryzM4fLErjjNHdYgwCq6bbgPDLK3ic9b3B4rF3E=","translations":{"en":{"changelog":"2016-11-15\n- fix: handling of temporary scanner files [#68](https://github.com/rello/audioplayer/issues/68)\n- fix: simpler analysis of incorrect files in scanner [#57](https://github.com/rello/audioplayer/issues/57)\n- fix: album sorted correctly by artist and album [#80](https://github.com/rello/audioplayer/issues/80)\n- fix: neutral cover for unknown album [#16](https://github.com/rello/audioplayer/issues/16)\n- fix: error message from ID3 editor shown in front-end [#77](https://github.com/rello/audioplayer/issues/77)\n- enhancement: occ support for library scan and reset [#72](https://github.com/rello/audioplayer/issues/72)\n- enhancement: select a dedicated folder for scanning in personal settings [#79](https://github.com/rello/audioplayer/issues/79)\n- enhancement: exclude folders from scanning via .noaudio file [#79](https://github.com/rello/audioplayer/issues/79)\n- enhancement: significantly reduce database reads during scanning [#79](https://github.com/rello/audioplayer/issues/79)\n- enhancement: cleanup of classes; move from \\OC\\Files\\View to \\OCP\\Files\\IRootFolder [#72](https://github.com/rello/audioplayer/issues/72)"}}},{"version":"1.2.2","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.4.0","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/Rello/audioplayer/releases/download/1.2.2/audioplayer-1.2.2.tar.gz","created":"2016-10-06T21:21:05.414691Z","licenses":["agpl"],"lastModified":"2016-10-06T21:21:05.483224Z","isNightly":false,"rawPhpVersionSpec":">=5.4","rawPlatformVersionSpec":">=9 <=11","signature":"toeS45z50Lm0djgrQokOTN7gA8a113IZtiKKiLsGUKWrCV/6AKJBmEFcSun6rhLH\nbz/RtIdFKwQql6O3E0m1Zch2y1A8aLWHzFTO+5orLCVi7y15SshrJYbb9aI5Pj3i\nSR7+kMHGS8uNx2uIn3B4mO6UYF8AzCfp+ule18DOjnpu86KWvEOGtFXsQkLtgepp\nbJhOGWW/uOVIos/T1xPP4GCmtVmgn7U3b9q0pMYRH7ONXEiNsfQxDrR66EZH3Jfo\nlVyM9UvQmMKoDSdBUlvLlhCEGJGqFOD7hFntLYloI4oXv9uGqcagaJVh3TkEysY2\nMbBZpVhch5zRJ/HGlZOvmEzZ8Inxkk3iap+JmJ5/gZTefwfKUyYHALsILlh820U2\nNA/1B5A015XH5a5uflGE/tnlPtrOeecIN4mg+1njo2RG89HJWJNHM2ZDO4SkXjSR\njgygmAS5aR5+KKifiA/pwjhLozDWPU4lNzsj3Foz3bx3Okopy7eq83LORqieT4Jp\nFvP64q/45LOSRBWIWLitYzRzZp7HYywMsnz12WpxtqxIjO7+7y/ByeWWOBNU1IJC\nK2D+035ZGWZr0CxDJte33WOISwjVoSwrcov++O3BQW8lM5IkcDNcJFyzNPKAXcQU\nPUXmQpYurHoIw6odAYcbrG6iOiSesuNOf2kQWbjV3/c=","translations":{"en":{"changelog":"2016-09-18\n- fix: icon issues with alternative apps folder [#65](https://github.com/rello/audioplayer/issues/65)"}}}],"screenshots":[{"url":"https://github.com/rello/screenshots/raw/master/audioplayer_main.png"},{"url":"https://github.com/rello/screenshots/raw/master/audioplayer_lists.png"},{"url":"https://github.com/rello/screenshots/raw/master/audioplayer_share.png"}],"translations":{"en":{"name":"Audio Player","summary":"Audio Player for ownCloud and Nextcloud","description":"Audio Player for MP3, MP4, Ogg, and Wave with a lot of flexibility for all your needs."}},"isFeatured":false,"authors":[{"name":"Marcel Scherello","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEBjCCAu4CAhAIMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYwOTE1MjExMjA4WhcNMjYxMjIyMjExMjA4WjAWMRQwEgYD\r\nVQQDDAthdWRpb3BsYXllcjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB\r\nALyC+iLscLs62NeNmUXEBmg+xMuUtDmZKr+xzJWtl6SSNRz+8K1JygvUIXFJ3RIL\r\nCYA3xyq8/wyZH1gNrLKyz5eTeYawG+eT3ges/FT6MWGUbZoRrBrikVcLC94QzxTH\r\nxOl8Dn+SCV/2bhcvPTQdhK+dqtvGilOtjHa40iMrk9gSdlKVys5CK/xdlEp8uiMa\r\nkz1WENn8MVCCJV58bAUbaCupDWXR9CCoSsw8XinNsCenZ2B2XlnmbM44280w0ojs\r\n72rfQRgj3yDG+ZUUyUOuxIuodu8liXYciLf0ph6t/f/qoSmctbBdsR5Fl1Upj1Ac\r\nqeHb5Yf/B3Vi6Mn3XfDx0H2EHk1v9Dhzxay+v9BHUzyIX2iH/q+7TE0/Jzo5AwBW\r\nvFKWXvG7wXaALcHYZf5v/M93IE0iCHsv2EsZKQPBnzXVGmp4DwFSP4po1B7hcog1\r\ngAMaellAzzvUAizgCovN6Qct3qDEANYniPlvtnlcaQGonajW4N019kFQRHLIzPFR\r\njab5iUMMwSnT8FhZO2ZOWuWhJven+gXjxC8mfMVgBfZnAVgydNfx9rN+KzTc88ke\r\nobUdZ0OOeBzA7pIxGEFg9V6KTEEWZ+qH048vxXz4HI9B1I+2wQLBrZl8CvweEZ5U\r\n5ID8XrrE/UaNZ1CvLKtCgB24gj/m1Elkh7wA3gEcEo2JAgMBAAEwDQYJKoZIhvcN\r\nAQELBQADggEBACtgUp+FCmjWIkQUuWSdzKWdO+IH4v9wBIrF9mo0OLIakFyDYyM5\r\nLlkYZXbplGXd4cfn3ruIqJNzlIb4xa5CU0bM4TMbD4oOSlLMKM/EamKPHI3bzr++\r\nzi7mQDFxmAE6FWSMBgKKUb4tqLc5oBap8e12tPEZl/UR6d9iUB2ltvrm3T3vrjjl\r\n2Worm0eYBNqnagXmX5+wS11AQqeJemGqRy5e1yXRlTgB0IJhH0dCsFNwifEigutp\r\nFNvGFVBn4r5qCiChEoq+rCXHRjPi/eCfbW21XeLFDiLxapcZyc85JIcA7znUYoFe\r\nP7Y/ekMscwWhLbF91OaQlcWpRtEMyde/DaI=\r\n-----END CERTIFICATE-----"},{"id":"calendar","categories":["organization"],"userDocs":"https://docs.nextcloud.com/server/10/user_manual/pim/calendar.html","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/nextcloud/calendar/issues","website":"https://github.com/nextcloud/calendar/","created":"2016-10-01T12:40:39.060903Z","lastModified":"2016-11-22T20:31:13.029921Z","releases":[{"version":"1.4.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/calendar/releases/download/v1.4.1/calendar.tar.gz","created":"2016-11-22T20:31:13.020268Z","licenses":["agpl"],"lastModified":"2016-11-22T20:31:13.087340Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"nThwe9CJBCan9nuDLdhfBiQyPhmum6Aa0UcYsIDdhGMw+C2acf81KhEmBJuTTWxo\nWGby6WcrcJJmeuCW+ePU91ju7Pd76RirprhVXIEceIDzSCxin+K0oZCZ1IGVIJjP\nIkVehTsLuCeTBbjvz1b3k5QFyhUhvd32Xt7k5d7VARyI4OqnqYYNBtH9vvgeRrFw\nAxsQr4o4axof6i3iykLg6WfWarYArY4dIuu5DkPuGPWf2bbgjwWEra4sQejhOs7G\nsk1xcsfYv2NpArIbpw/wnATdjiax+Gjz1URMD3NgL5ky0ecuZmNvN25QErg3nlVr\nhh1FBfA5pvCJbkJ6nr5bU4bKaffwDX1nr5h77FS5zzn0Pyd7ZIExmVmNtaeJfnfV\n5vnclapzXMNU+R6t/ATJQd1srvSJhyljQapzsqnrjNMEUojOEvqqygJp0KwNVPqs\n3g9XGSoOnO+WULWBeISW7UVOg8BOF8pwvHIU2++bSzOdpypW0Eq6p2DPWO6qL/H1\neFLKrUg3EvnTjvknbBxMB55h9jNJr0SAlkrmyEVm6+CE3BwRWpKB+cJMBuGiwPwv\nr/ASRiJrkDThbNWAUtX70rUmCqDV6/MujLXViqOc/Q2OHvcXd1oGDccJSQT92/1z\n7nonnedyYQIDqUt7u68WL8JRxp7pFsEqKLVuWSgxW3c=","translations":{}},{"version":"1.4.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/calendar/releases/download/v1.4.0/calendar.tar.gz","created":"2016-10-06T19:58:12.724588Z","licenses":["agpl"],"lastModified":"2016-10-06T19:58:12.790604Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"b//hJbICFMLR0Va1BGMzpLpaPREOo9QhjgfrHvDOfXVpddhvCM8ocz74X1s5hKyy\nGg67EE0pOp0dBf6RyJjduI+Dz1wQX55My7J9G1vXGCN30C/8zAcKSJoA218IWcub\nICavLkz2PkiitIOSZyBCAfEiSAeHPop/JGkq3KxQDC7QwFC78BnE9/adD9tO55c/\nDGLhvP/uTJIeH8RUifikTqVMmPH+aP3uPbZzl+AxhUezRiNCpEtZPA5QGqtQdJU4\nFc6x3d9y4IWbJV4TEIAP8jdfqtLVUQ6szFVnN8Oi1wtN9e8LIylBSYbmIZRj0+qh\nZcgntzEq6U843ZwXcAnL5jNYV0m+KNI+EkXFeWHkjvbwfCdvGPBvgFVbhc0YPzXU\nqHOe4Lvcx9X20ALG/MacV9zX69GzNnWgbBp9RnIHuaSRPFEKrNXUeXl2THuKsTyQ\nF9QtTwS5U5DcMyTO2RAN45NrRxIh8IL4stoIg5rmF7/ZaOm/Jza2gnUquOTarDE/\ntiWnNW5kWUAWyYYHvQgQix/of9qXvc2hhZaw0y623WDNrEwA+rngnjDMLA/vNv3B\nhgwQ6NbCOuHWsRK3S8DcJFpB9Kj/i7CDvDLEuJYnjSTvQ/q1XqawbJPDoRlydX43\n3/L0LvHvKVakYybv2OE5gy6bQ2Dw8e7D27DtZ6XTaBY=","translations":{}}],"screenshots":[{"url":"https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/1.png"},{"url":"https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/2.png"},{"url":"https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/3.png"},{"url":"https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/4.png"}],"translations":{"en":{"name":"Calendar","summary":"Calendar GUI for Nextcloud's CalDAV server","description":"The Nextcloud calendar app is a user interface for Nextcloud's CalDAV server.\n\nIt integrates with other apps, allows you to manage calendars and events, display external calendars and invite attendees to your events"}},"isFeatured":true,"authors":[{"name":"Georg Ehrke","mail":"","homepage":"https://georg.coffee"},{"name":"Raghu Nayyar","mail":"","homepage":"http://raghunayyar.com"},{"name":"Thomas Citharel","mail":"","homepage":"https://tcit.fr"}],"ratingRecent":0.944444444444444,"ratingOverall":0.944444444444444,"ratingNumRecent":9,"ratingNumOverall":9,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEAzCCAusCAhARMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYxMDAzMTMyNjQwWhcNMjcwMTA5MTMyNjQwWjATMREwDwYD\r\nVQQDEwhjYWxlbmRhcjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMm6\r\nFTeqgzCXprkU83VM4/DrZWn3kqtfaR/edkC4gYT3ug7RHa/Uv1C/S++vr7pvgpnk\r\nYzQoavl/0Qlh5sKEYX+0ud/LQDoiidwBRDckFUQ1bRfVLxAD9UAVvDRHxDqJMOx2\r\ngZArbeQ3ztdSHZp4ThzBFWq2FILsJD86weG7LwHjzhW6SWgLb/YTLbuuW6tRCDVV\r\nbtB0I/a0vCwj2u91Chw3u6pWWjPakc9DQrIDH4HCIBKQ4zVrYDxAmJDRFGDvVVWx\r\nuIAeux8sd8drqSMqAhX+XMcZPRD71NQTWbCupSwWO8kgjmZnBpIiBNpzvMQzJf3A\r\nQloZtjZ2RDXAQG88eTeT8pp8yEOCEoDLpGdraKxJrh/z2Dsk30JP3lOiNYJ9vBaB\r\nC8NJbJ3oAlG7THwUaFF9fsdAKoTwzs5Xms04TI7W/v4Z/GClOzMymnR1T4sR72Oy\r\n3WaMNHv/1QGffvQn2/TtZt23Ou3P083xWx2vn5FgTcac8+x85vRgWsVCA4hq9v6m\r\nAlktB0+UWDEXpDTKD9BdFNWM8Ig9jQf7EJrvTLNnS7FIJZMB4GK8lpvPxyvACWnh\r\nR2hQOe987Zvl3B1JZNO5RvtSeYld9Y9UfMgW1aPRweDNjSuZYAKlugx1ZoyI5HyA\r\nQjfzAwicIMwZsCJDV/P5ZO8FE+23rdWaoJczpBqDAgMBAAEwDQYJKoZIhvcNAQEL\r\nBQADggEBAHQXwvj8q5khWR/ilg3JGYpmMNBYHE9OeDaOcNArkKaGMd478SDPOXeu\r\nyW7hCvNEpiTk5g0h3g3yleZFws0xH8fPsQgZANgvQXb3RCcD61NL77d0cMTr7Xzr\r\nN3Lq/ML1YLc/WwL4uV1XvpMQMwALFL1p63BU2c0ysO31zbLOjMKAJi0hHFDYz5ZQ\r\nD3xxtc17ll3B5IqrMnMHRqmOQ39Sbe56Y7T4agaIz/sUWpseo85D5kt7UAIOR+Mr\r\nQ0Bl/QinETk72afGR46Qvc7tC1t9JjQQD3AUbEGuJdGvXjJJ9GREYu01XoODmPdT\r\njXXOI8XIOK6kxXhPHUc3iWu9b4KqGm0=\r\n-----END CERTIFICATE-----"},{"id":"gpxpod","categories":["multimedia","tools"],"userDocs":"https://gitlab.com/eneiluj/gpxpod-oc/wikis/userdoc","adminDocs":"https://gitlab.com/eneiluj/gpxpod-oc/wikis/admindoc","developerDocs":"https://gitlab.com/eneiluj/gpxpod-oc/wikis/devdoc","issueTracker":"https://gitlab.com/eneiluj/gpxpod-oc/issues","website":"https://gitlab.com/eneiluj/gpxpod-oc","created":"2016-10-31T10:57:44.387319Z","lastModified":"2016-11-23T17:27:37.793159Z","releases":[{"version":"1.0.8","phpExtensions":[],"databases":[{"id":"pgsql","versionSpec":">=9.4.0","rawVersionSpec":">=9.4"},{"id":"sqlite","versionSpec":"*","rawVersionSpec":"*"},{"id":"mysql","versionSpec":">=5.5.0","rawVersionSpec":">=5.5"}],"shellCommands":[],"phpVersionSpec":">=5.6.0","platformVersionSpec":">=9.0.0","minIntSize":32,"download":"https://gitlab.com/eneiluj/gpxpod-oc/uploads/963bbf246412bcbe8979bccadb3b8d03/gpxpod-1.0.8.tar.gz","created":"2016-11-23T17:27:37.783365Z","licenses":["agpl"],"lastModified":"2016-11-23T17:27:37.862469Z","isNightly":false,"rawPhpVersionSpec":">=5.6","rawPlatformVersionSpec":">=9.0","signature":"hqhMh1l/mnwbYf4uPzEjjLFtZWHidzgR57X471OuXv2K/s87T5WhIkTSKk+2r8sp\nS7CtrF5+Pc5AgCCHvwzawN3e2+4eO4cK0+HD9CCzygzzHZEbSjufNHMMQucVoSD8\nPqR6MV9azzUpwHa/5d8fp3cFLVAle+aG0o4v5eHky9c7eaKxVJcgfjw3pjDE73N6\ngJVdtw1jf1kOFYk5pZQxDfBKFDrO5BRo5ZfZGuOuP2u/SmTwj42oTZiT7oTVWhqd\nLvJw+2TPv7B8s0Gin+J5e9K1Rs6CEWQ6WBxM+NhS5KgWB5Ig3pwm0QvMgza2cvoh\nlwVobOotfKLUBJzg0+wR7B2YH9Ao+m94h93vg7H0OKPReoTKhlDj2UExoTyeurV8\nhJdQv8sKVAxjC7/xrVaGSjM4YxFdBpzq8Zl8z4zq1o2voH5+u4ko3c62C1loDpsC\n8KrL1t6A7QpMk/XAMrPqwEPmFqlLEdv6FhzpOGyt4IEVnv6vdMTShcYw3tPvU/mD\njPtiVwpo8gWbGVIfpmwBg4wPaTrWK8V3+/1iTahIQHZfu4Lebb5mzht80HLQIcd8\n+oB4cGDEX4Rix1WxnCmE5ZzURY8xQXcvqYN+mTrUDh/3OtxQPSm5yC945SGoFNpr\nBYxfEyQcwulZrOMBdY0Ssj1AB5NOeC9OHwjJrnVe7dQ=","translations":{"en":{"changelog":"### Added\n- save/restore options for logged user\n- option to choose picture style (popup/small/big marker)\n [#25](https://gitlab.com/eneiluj/gpxpod-oc/issues/25) @eneiluj\n- add average speed and average moving speed in comparison table\n\n### Changed\n\n### Fixed\n- bug when python PIL is not available\n- deletion of bad parameter given to getGeoPicsFromFolder() in controller\n [#20](https://gitlab.com/eneiluj/gpxpod-oc/issues/20) @eneiluj\n- bug in file cleaning, bad use of array\\_unique\n [#22](https://gitlab.com/eneiluj/gpxpod-oc/issues/22) @eneiluj\n- python script do not need to be exectuable now\n [#23](https://gitlab.com/eneiluj/gpxpod-oc/issues/23) @eneiluj\n- jquery.colorbox was brought by \"First run wizard\" app, now included\n [#21](https://gitlab.com/eneiluj/gpxpod-oc/issues/21) @eneiluj\n- avoid JS error when failed to get options values by ajax"}}},{"version":"1.0.8","phpExtensions":[],"databases":[{"id":"pgsql","versionSpec":">=9.4.0","rawVersionSpec":">=9.4"},{"id":"sqlite","versionSpec":"*","rawVersionSpec":"*"},{"id":"mysql","versionSpec":">=5.5.0","rawVersionSpec":">=5.5"}],"shellCommands":[],"phpVersionSpec":">=5.6.0","platformVersionSpec":">=9.0.0","minIntSize":32,"download":"https://pluton.cassio.pe/~julien/gpxpod-nightly.tar.gz","created":"2016-11-16T14:06:33.937534Z","licenses":["agpl"],"lastModified":"2016-11-16T14:06:33.971502Z","isNightly":true,"rawPhpVersionSpec":">=5.6","rawPlatformVersionSpec":">=9.0","signature":"JtUhKRDFGYDx9xtHjdfEUFOb0O4idexUYw6ixlBhKPP8Dn7NfyBfV6KH6MJTIVLU\nQ5Jw6tv/Nr1YDOvVikcWPG0p23mQdn1+7w8DzzIGKmknxCat9/vKr83oJZdWYxS7\nTJ4I7qTvWNlbMfK8OEdl13VJXgc6ftX+1isluLYqLjEm3aBFCS+/awYNMmXO55a1\nyG0NgJRu3pw1CBCMhDaRLsunhpRNDVLsamZj1SPmeT8qy0I/arFaG6hQnAo6JosE\ndi1XkvK6TEt9g16L6eizd+JpGE7xiWFP9ZEmMmmQSOLQYwU5Sk1YWcrW3EX4vtz5\nWnEIC0SENyyAyzBO6YJfu/EP2lLnlbNJiuc4zzKLqRw/zyz3j+imJLcXHIA78ZkQ\nuyUOBkkk3xeyBGeUcYfDuBqYQOQs+F/7+cNMsIBKJhx9ef3OPURBc7X16upk3mxV\n6GsOktbHkgUwWk3WiXRriBIqbAZocvDp0+PN++PAEZVWFEZEJzztd4Fxaeo+QSN5\n5Pz/9yXYRsoSPZv82Tlh7dx5tIPUvYb+UsANh5eGWUGufTSwgYBN0H2KT/iO35D7\nkDzNyh1qNakfBhAgPjrC2p4mBKBJJjlM0D9erDwr5D4GSTW2fp92vlRHeD0X8sqo\n3kBbwGuWnmhdJhbd7zYy0jVM6tVX/zgbhycimNALG0I=","translations":{"en":{"changelog":"### Added\n- save/restore options for logged user\n- option to choose picture style (popup/small/big marker)\n [#25](https://gitlab.com/eneiluj/gpxpod-oc/issues/25) @eneiluj\n\n### Changed\n\n### Fixed\n- bug when python PIL is not available\n- deletion of bad parameter given to getGeoPicsFromFolder() in controller\n [#20](https://gitlab.com/eneiluj/gpxpod-oc/issues/20) @eneiluj\n- bug in file cleaning, bad use of array\\_unique\n [#22](https://gitlab.com/eneiluj/gpxpod-oc/issues/22) @eneiluj\n- python script do not need to be exectuable now\n [#23](https://gitlab.com/eneiluj/gpxpod-oc/issues/23) @eneiluj\n- jquery.colorbox was brought by \"First run wizard\" app, now included\n [#21](https://gitlab.com/eneiluj/gpxpod-oc/issues/21) @eneiluj"}}},{"version":"1.0.7","phpExtensions":[],"databases":[{"id":"pgsql","versionSpec":">=9.4.0","rawVersionSpec":">=9.4"},{"id":"sqlite","versionSpec":"*","rawVersionSpec":"*"},{"id":"mysql","versionSpec":">=5.5.0","rawVersionSpec":">=5.5"}],"shellCommands":[],"phpVersionSpec":">=5.6.0","platformVersionSpec":">=9.0.0","minIntSize":32,"download":"https://pluton.cassio.pe/~julien/gpxpod-1.0.7.tar.gz","created":"2016-11-14T00:57:37.521001Z","licenses":["agpl"],"lastModified":"2016-11-14T20:35:45.363487Z","isNightly":false,"rawPhpVersionSpec":">=5.6","rawPlatformVersionSpec":">=9.0","signature":"SigBof6QJZ9IMZyFgc+B3LO2+EXaAPvnxUHjJQjIl3jLzomocpDGR6WjO6gtvB81\nzXUHjJ8+huc+P9TvgjUGRTmn9a/29HZ4IKTXnYBKIUY7wSLcJNMbJSp2Zd3OFHAG\nJwRaEdh/cIRk2X6NE1VT6dFCxB+LhTM4BXOEwuNYQvU1lZDVQgTz/r68zFLWBt6R\nqhBCNJHrVp87ecS4+XaGq/CfT4k1ihiOv+f4eX9iaPzUhxBJ71iYKF7wHpDoVmIk\nNrzWFUJH3BLBuW9oiC0PApli6Xu5RXrWUsOV7OAmxXgylRCPuTFwe09hw16JMbiS\nii8WFiUtp4qW53+7eoS7Fllm7CRi/Dg6Jvjtp3msrf1m+OiYM7dLyoKw22/S4P/a\nBIErZpSCHaCfrZ+DBXrAYcas27GWE7HizzG3yXk3aDJMa0Otcsq56bSPo01JDfNx\nm1y9iuwmlon8zKKoxsJCwxaFDnQpqazaLcUO0ATHUk8LdomTA7MCXVvNFPaO86Ea\n16iyw7Cfs0k3GrvN71+SdpvWss359CEEwBMpDwJZqwSFbLRyHtogUgbRWLIJqR4n\n5uVvJqirxWkr/EtXw6UkDWAI3ZoMhMRtjn4H4ekANP5mC8R0yp+UuFs2RkEC5uA0\nKzzh73WmxmpeUl6jcMZ49gXn3PTCC2fJNrdmSYch5Dc=","translations":{"en":{"changelog":"### Added\n- option to choose waypoint style\n- show elevation, lat, lng in waypoint popup\n- ability to display geotagged jpg pictures on the map\n- pictures slideshow with colorbox\n- pictures work in public dir link\n- use NC/OC thumbnails to display pictures on the map\n- options block hidden by default\n\n### Fixed\n- fix bug in geojson generation for waypoint-only files"}}},{"version":"1.0.6","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.6.0","platformVersionSpec":">=9.0.0","minIntSize":32,"download":"https://pluton.cassio.pe/~julien/gpxpod-1.0.6.tar.gz","created":"2016-11-07T12:11:00.619161Z","licenses":["agpl"],"lastModified":"2016-11-07T12:11:00.699921Z","isNightly":false,"rawPhpVersionSpec":">=5.6","rawPlatformVersionSpec":">=9.0","signature":"WBts2fm2rW/7LMHYjcx9a0k0WTXV6PnGRxTl+158cjfV7ruMpNvhK58iTjrox69k\nFWAoIi1wNAlLBu9Xet1j7HKi4TC9q61IEN+lPlnwBCu0uHawiqS2gqB4i8A019Ei\noLsgAPWh8ndy6+gyUtPhVLVduLH76aT6KTwAiHPknV0zPtxsUy1P6nbbNOS5A5rG\nSQBqljy0TbcjOctTudEPp1IqjJIwcd12eZ9MLG4CEIO13n53pMAsuXJf4jnKSCm0\ngimvsFOwFRjBab3ZPwtOqeVw6aIh/lYF3U3/k8YBpaDN74m30nDtkp8teXBgshSY\nVYvX3yOAYe0PIR419IX0eoHb61K0VfZYvPT4FsOqjDr0zlVB8Rjq+6SiK4vMD2+6\neGE0aHbjR9HV5jymUnFYdm/hlhcZGaKrAiQKfBY6Vh0SWKfIv7bdGfQYauePAdZt\njlsV8lIwOy7FGAeP81CcjzWWfDeBgYr+MSzfoDNoTi41MvUaT14iWPIU/s5P1/Qv\nALGxgsbmB19wEgNbdh1UtTUY3xARLpWPYdUqU7yDcsddX9vCoCG2G5wCcbYJRj8o\nC+H7wdgPJoiMY/p4Go/lyWkvmzhfXrOeXytZIFXjb3ERVd1vD9WSt1DSy/7gsFYt\nxzzOPgqMvL3BbeluNuzNv366oT872s3OuFKa1ZOYY7A=","translations":{}},{"version":"1.0.5","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.6.0","platformVersionSpec":">=9.0.0","minIntSize":32,"download":"https://pluton.cassio.pe/~julien/gpxpod-1.0.5.tar.gz","created":"2016-10-31T11:08:41.017766Z","licenses":["agpl"],"lastModified":"2016-10-31T11:08:41.068782Z","isNightly":false,"rawPhpVersionSpec":">=5.6","rawPlatformVersionSpec":">=9.0","signature":"UXeZVh5f0/WZE+r/dHWc1pu9q4qr/zACX6XraMhhIuKIp7vNCwUESeqJtVc99QZw\nw9kJp0isvib6l0zbQBRS1vI7xwKKBQyeaEhIciEs1JjsaCiato1Gyi26N+fY2N0Z\nFWlTwCsF3DdlwERXTYfeCpsOWCoxLxHKhnJIjUc0PVme/Ste4zxYj+5Su1RpadSw\n4vGnkW8zy/0tzua50NQCrOg+B4jXzH9kMWAP47w3sdP5CYalHSHl8EX0D1RjgGU5\n7vZYX3wF853FvQDbL4JXXCJupj3wZe8py8McWpQIcgz1p3KmE7A7d/rdNWExT+T+\nDxtStJ56qTRMz4aFwoSFxJrrEfgHIsE9Gv+Vo7nshCUYA8gkfHeckiaUtH1EiFTh\nVNeO6mTIqGpRosFvfUrZMKcuF5j74vGQjNM1o+M5N31gtLoPSkU605f/U4v+j2oC\n3/N1rYF2SEDFO0EgAGXaXVhB0ltSDkHJw6vZJ1L8Qz6tooUMDxaMri8vycA6LHvE\nqN+z+S6TXMfLvN/6ATYPGhicrWmkMT/k7v1az/hcnfH+zRyLZyFx94s88JWF7Jf+\nI+tgDbfqTMAIcytJUC+KfdQW1ueXh5F0owrOYM6jgBRvhqj1T8s+Twgw8orGmRPe\n9h8G9Z3wZAooQvmC0KdVhLuOeIkqt/S5krELNFFBRnk=","translations":{}}],"screenshots":[{"url":"https://gitlab.com/eneiluj/gpxpod-oc/uploads/db5af6ba7ae1cd4d22ea81d418f5c762/screen1.jpg"},{"url":"https://gitlab.com/eneiluj/gpxpod-oc/uploads/123588561a8067185572a8d1887ef906/screen2.jpg"},{"url":"https://gitlab.com/eneiluj/gpxpod-oc/uploads/427688b80bf8428dd45bd15d69b19075/screen3.jpg"}],"translations":{"en":{"name":"GpxPod","summary":"Display, analyse, compare and share gpx tracks","description":"\n# GpxPod owncloud/nextcloud application\n\nIf you want to help to translate this app in your language, take the english=>french files in \"l10n\" directory as examples.\n\nThis app's purpose is to display gpx, kml and tcx files collections,\nview elevation profiles and tracks stats, filter tracks,\n color tracks by speed, slope, elevation and compare divergent parts of similar tracks.\n\nIt's compatible with SQLite, MySQL and PostgreSQL databases.\n\nIt works with gpx/kml/tcx files anywhere in your files, files shared with you, files in folders shared with you.\nkml and tcx files will be displayed only if GpsBabel is found on the server system.\nElevations can be corrected for entire folders or specific track if SRTM.py (gpxelevations) is found.\nPersonal map tile servers can be added.\nIt works with encrypted data folder (server side encryption).\nA public link pointing to a specific track/folder can be shared if the corresponding gpx file/folder is already shared by public link.\n!!! GpxPod now uses the owncloud database to store meta-information. If you want to get rid of the .geojson, .geojson.colored and .markers produced by previous gpxpod versions, there are two buttons at the bottom of the \"Settings\" tab in user interface. !!!\nGeolocated pictures can be displayed if python PIL is installed on the server.\n\nGpxPod proudly uses Leaflet with lots of plugins to display the map.\n\nThis app is tested under Owncloud/Nextcloud 9.0/10 with Firefox and Chromium.\nThis app is under development.\n\nLink to Owncloud application website : https://apps.owncloud.com/content/show.php/GpxPod?content=174248\n\n## Install\n\nNo special installation instruction except :\n!! Server needs python2.x or 3.x \"gpxpy\" and \"geojson\" module to work !!\nThey may be installed with pip.\n\nFor example, on Debian-like systems :\n\n```\nsudo apt-get install python-pip\nsudo pip install gpxpy geojson\n```\nor on Redhat-like systems :\n```\nsudo yum install python-pip\nsudo pip install gpxpy geojson\n```\n\nThen put gpxpod directory in the Owncloud/Nextcloud apps to install.\nThere are several ways to do that.\n\n### Clone the git repository\n\n```\ncd /path/to/owncloud/apps\ngit clone https://gitlab.com/eneiluj/gpxpod-oc.git gpxpod\n```\n\n### Download from apps.owncloud.org\n\nExtract gpxpod archive you just downloaded from apps.owncloud.org :\n```\ncd /path/to/owncloud/apps\ntar xvf 174733-gpxpod-1.0.0.tar.gz\n```\n\n### Post install precautions\n\nJust in case, make python scripts executables :\n```\ncd /path/to/owncloud/apps\nchmod +x gpxpod/*.py\n```\n\n## Known issues\n\n* bad management of file names including simple or double quotes\n* _WARNING_, kml conversion will NOT work with recent kml files using the proprietary \"gx:track\" extension tag.\n\nAny feedback will be appreciated.\n\n "}},"isFeatured":false,"authors":[{"name":"Julien Veyssier","mail":"","homepage":""},{"name":"Fritz Kleinschroth","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIIEATCCAukCAhAaMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYxMDMxMTA1MTI2WhcNMjcwMjA2MTA1MTI2WjARMQ8wDQYD\nVQQDDAZncHhwb2QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCq9p5l\nzNzR98l/xPgrplWrGQBhF6aQSLpnIyCdLAYKk+CmXn47W1pHh5CRYyCCyB8YPBBG\nTwbpP69pP1updfK2vUt+ShYmCXLxOLB3qEdhnwgqFfwpC48Ocev9d6XcacYp7jwu\nRNtv0ocMkm5o0TWWupcutQWkmqzCVq+OkrqM0xrf3mfPymuM6edEREshukoL86Ei\ngTuMMGT0XO99LikszvdceNQYEATix1MHzSVhkE7jHCNBXb95H6nQGr0v7R1MIbrI\nGFlgqxwwNNKwBFNfPMWZVnKwz9hoIwW6WOuu7ntwVcPqwB/gUsRZJTu7EjIW0trX\nnhA6xLlc4X66W1sdUCkJOxsV+Y21akz6wynI0SzIfjALLI2Ls4QWrPM8GOX8nPVM\nm+Y5WXzqLJScdWYoefFJKS7kxwUJRewREB9ykCG5OdDubV+Iu/6jh6HWx3h4p3ih\nqkDypPWoxpfLgA8VZkLD1RRKGkRa858QBGdF/RHbYT3JfLEp9l9gJVKZE/yw7HKk\nwsZ/T6CMpLyorpd1XWtp2wLX8lr3pp9ecVDOdAMSqD2thDMDsZA82JrJ/vITwkCF\nBlqtDZmT0UnpxYNYTfYBam5Cd00jsqCt+Hr+QkODNe8Yae9c/D0zE3h2Vt7g9H+W\n7Ei+rF5nDYTBAApoETxK7+aUZpycBf3THAJOcwIDAQABMA0GCSqGSIb3DQEBCwUA\nA4IBAQBbCGAEwg3M5QJDMnZgu0zNOH2f9bamAS9ksyCZqzLoeQic1W7GYYe9NqAi\n7lO5jXRZpTN4L133IUQPtxCxuDooD2vFmCne92tLxJbc7uqlSVfhL8uMVOlnrA99\nKTAhySTZU5so8/OibrngnBmcdWwbhaWoCQ671M8aXM1wg2FVYDqB2GP3RvbpW11L\nOc+4tfh4mO4TwXygf7KYMOJyJW8mNNY7PZ+XW2Qe3vSXR3DuN8H8fgMh5wppXPJf\nE0+yNs42hwFjSojtI8BCb0s5DTleaakpDo8HQGNzEXP8tBlUYudtjzdP0jxFXbFa\nsT9pcMdeJ0/t5HqJSx1EjUCLYS4y\n-----END CERTIFICATE-----"},{"id":"ownpad","categories":["tools"],"userDocs":"https://github.com/otetard/ownpad/blob/master/README.md#mimetype-detection","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/otetard/ownpad/issues","website":"","created":"2016-09-29T15:58:52.814912Z","lastModified":"2016-11-19T17:37:52.278497Z","releases":[{"version":"0.5.6","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/otetard/ownpad/releases/download/v0.5.6/ownpad.tar.gz","created":"2016-11-19T17:37:52.234684Z","licenses":["agpl"],"lastModified":"2016-11-19T17:37:52.423930Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"dh+Txg1iVfqXr8+cxplNQuBZGErSnXUo0ewGwnybNMJqp8/EjEo72+zPpW3dVnhY\n67YCvhrm2bo+VRdFFymEfymzSJu9nWVFkGJhEwvTxPyIdAtuD5YAVrzmnR6L+H7m\n7Q1nXE63ICPCAQpHkxIfIXLh25OhWeyofBB8AVsjDUNn58FEYJ8fFkr6dCgPriZS\nsM2J+xtZMDYufy+xFMsVf/Q3WopjFuBjMC3qOecW76ZTwtREaswOC2RtpzUku2r1\nsogrfFlFer3Ii9/CWgOktnLfjB1DzbTwdEkM2xNVBRJgdMXt2VLA9FsxFFkjmr5A\nl7x9cNLWA8RLpOIpIMBbaef75u5HgRBvSvq114UsA9GCu/EYbIgD8YxEt7xuKd4t\nenksJB5gJ2IQNdHrPbsil59AsJ/dismDN6ktYgWQEk5dINzvm9EAvucueW0Gt+Jr\nqEC5WBgJucsFxSvkHh52v43M8jgPYBfHWEL/M/+377z3+mbuIh+BcQ+vcDdiqxTF\no3n0+gw3QYIhLEe75sUhxG6ynVUdW25AKKju1kVj3KJnZTBH1R8t8/zy4DnJG8d4\nuRGqyU4BXpZjEC3nVlsC7vCncWWhxl0WZQ/MWKqsfjVAU4I88E518D6NioqMnPEJ\niCZ2x+69UCDEQyfCSKajgAYT17r3OhZei8F9KSCH8Vw=","translations":{}},{"version":"0.5.5","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <11.0.0","minIntSize":32,"download":"https://github.com/otetard/ownpad/releases/download/v0.5.5/ownpad.tar.gz","created":"2016-10-06T07:51:05.278637Z","licenses":["agpl"],"lastModified":"2016-10-06T07:51:05.348825Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=10","signature":"nYsQ9U5r7uXwtcquaWGm2XMJBNYCcA95aUx9gLZ/wEmjCHqId7+MzcCdBnom33+j\nat2XR2a4R96UAUP78bfSC4Yb7nPepFT51Y8CSpV3mDT85/+SgJdq500fXldq+qGY\nffXLneadAztyOfZO9TXljaCLdREYI0LJIGVENsxBQVKM/eyGIuZO7fF70cH5vbfS\ns37+BXB+fxcDTlP2Xuulra8HsNoS81bzjsdVMLM7B7QwwO6rZ1zd5c3UzQ1LmY5g\npQUBNd0KjfHfZ6+Fd64XZO6NGfgucGNmL3lgxdsfUqKiLtikvFxK39dYW5MckV8p\nvLoS2nZ7cgETQmAW9Ahn3ro7gXWcPxzL41oWtZOOHRRC2Yz5zlZ3Bky1o+bF9g5a\nYdDF13zV6utUkhlplZhWbjKaXa04rzOvmut8Iqhx/tmDtZRYtaQXJZWutVJYtPC3\nH86uJJnUHHNFHeoT560mp1Hq0dTeR+G+yWsPacPD1rTYgZOUVEtj3Y+YdbTODR2o\nOdGzeYFl+6CL/OcY4wPGRUCTFwvc31lIUd4DK5SPfN+IGtuuXhAqVhwy6lpkcKRs\ncj8sBoVXbMvEtMnt5uARBvA4tyVffUL4oyoIsUnvXz4u+q4WVt3T17swLm6HjGVC\nNVqU0srHN7EeBRhHlXP1CrKQWGQlS4k9j9Li4Iw+X8s=","translations":{}}],"screenshots":[],"translations":{"en":{"name":"Ownpad","summary":"\n Create and open Etherpad and Ethercalc documents.\n ","description":"\n Ownpad is an ownCloud application that allows to create and open\n Etherpad and Ethercalc documents.\n\n This application requires to have access to an instance of\n Etherpad and/or Ethercalc to work properly.\n "}},"isFeatured":false,"authors":[{"name":"Olivier Tรฉtard","mail":"olivier.tetard@miskin.fr","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIIEATCCAukCAhAPMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYwOTI5MTU1NDA3WhcNMjcwMTA1MTU1NDA3WjARMQ8wDQYD\nVQQDDAZvd25wYWQwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC6CY7I\nHRJTaqDu376vt+kruX+QOL864joScxRuh3IOVcQktCvxasuA0EtrX7TCAQrV1tBK\nfkqJxU9uOV54RTgyh30yH/ZtnF2bYQwViGM06Snc0riqWydFrN5fxK52dpZWs63o\nUFCNhHxrX4aUGyfXu5nQMISLm4QHoZ3LDLofk1ZsiK62fM/Jz8N2PM8qeHzf1ATo\nSKcAOd3UeaS9C8bv2DuiZM7unkSO/tjrBzkMiq8ds9sIzBBsyk6BRh2HQjHPOtmO\ned+pS9mIZmc2xhssXoHL4IfZwTqwhktpsaTl7v0ROw2dwDATz/QoKMkUpboQ5lkz\nwgLQhoIZw6uAZ1R/Qjze59I3iU8zIo9quDarHBotZNXboYCmg9FRfE4mHtegVaa8\nv1a1JvFQ5gvsWEsKSV6Bzb65GTp4KG4q7YnUrzh6HJyDCGLvLlWm5OWsFj6sNzXX\nwLOv6JLORMbF4ZIo2iybb3x7gdfCu9JxMZ4JtOUC8KSJ6+ub15C1Aia3lN68dNts\nY6KwUF1Ted0o4OQPAulq5pUc+g6dTYmIKsavIiPKhMtl86AbUK50vRTeuGdFsT7X\nav73IanPdFI9bKth+tajgvB6dxcVnvBXbrsLUyEcsxsxtBJvQcMYS4aZ6ZJYLTep\n7AdK0Zt1iMdXB8+4PCps4rcG6bYB/uJeEAVm7QIDAQABMA0GCSqGSIb3DQEBCwUA\nA4IBAQCM10O+sCYhIExnx01vGzKlnRS7MSQNx8ZMmbR5Elfz4AVJAEJ96ytS2DXH\n2c+hcD0wAenXQEFk920AEqFQBT8DP34p0FmF83aMHW08ovzFiu4MdlhcqrLnko0h\ncZTXHVyS/8JZh+o6SVm8R0/BBLF1MQQ5TqRkJehbmk6gL0+MSYxehUDKWTjJITkR\nifneTw/Ba1d0AXBOq0c0HFyGxMPIlWe4qn5LtxH5t0wyVGeSj4jyv4nvd3ZGuAgY\nEUa2uYht/z475k4+vf0YhV98iQH07GnmlfD2TDZgmOCQGKlNfJh1v88OZyLLa3dz\ngRHzGwKbAiJ8T8bbpZ3e2ozXxADr\n-----END CERTIFICATE-----"},{"id":"announcementcenter","categories":["organization"],"userDocs":"","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/nextcloud/announcementcenter/issues","website":"https://github.com/nextcloud/announcementcenter","created":"2016-09-14T10:38:53.939634Z","lastModified":"2016-11-24T11:21:50.324839Z","releases":[{"version":"2.0.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=10.0.0 <11.0.0","minIntSize":32,"download":"https://github.com/nextcloud/announcementcenter/releases/download/v2.0.1/announcementcenter-2.0.1.tar.gz","created":"2016-11-24T11:21:50.317635Z","licenses":["agpl"],"lastModified":"2016-11-24T11:21:50.386203Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=10 <=10","signature":"lmqeE6xBqUJfhuXPbjCfuWiIP0FEB4V/SsF/OvYar6rLpvDpJVf3DJoeIoxXurRP\nE9/xCcNN44P8PreRRDnFLCa0XsKOtwoGa56Lxk7IKvtiQG6xu4J6PKM+q/tIeF9K\nakw0LQXtjZB5InPhnCDDbY5YS9jgGEBylSHsgNgrElipcW+BzOBu1Amw4FECVlQw\ncQ83bio+YPZvsnE5+v3/bAx0m6QNxfyN9Sn6rMEqRkY3jfA3vejXGQH/XkputfV+\n5hOz48KbOVg7cKxg+ieJlSwC0aYjb+RXiopjc3icCoIF1llltOOeSsVYSflOb080\nupociPgQ6qIab/VNNXa2YQ==","translations":{}},{"version":"2.0.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=10.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/announcementcenter/releases/download/v2.0.0/announcementcenter-2.0.0.tar.gz","created":"2016-10-06T12:41:56.195206Z","licenses":["agpl"],"lastModified":"2016-10-06T12:41:56.263124Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=10 <=11","signature":"NVWYz73KtuoZ7ti2sluztJO5aFUc7PzhlDcg0VWyAQd1H7sk5wjw7i0bhrjw8O7M\nLsrb+PegnsL9eMlYM2WrRom+RF1PDP482xymZf1T8vh8qcTCm3TK89xSuiSm8yoA\niWUb/Uv/ODj74wVDWqWxAFKaAG/FestCB3InOOZQqQZLzlAV0U9ziYDGNzBjFqof\n9rLNxJ2IOqZOA7hhMIKhSrpA0KkSfNhBsVf8CWClYnVkZQiq0LoYkHkHIlXmXUr3\nOfQFKEjtsx+bNLa6CkAaocHGHJXAofX3GQZ9cjBsjZqiTfbXfcVk0kRfz7pwL92L\nI1McfJYvgMxDQG5bjRpNJw==","translations":{}}],"screenshots":[{"url":"https://github.com/nextcloud/announcementcenter/raw/stable10/docs/AnnouncementCenterFrontpage.png"}],"translations":{"en":{"name":"Announcement Center","summary":"An announcement center for Nextcloud","description":"An announcement center for Nextcloud"}},"isFeatured":true,"authors":[{"name":"Joas Schilling","mail":"","homepage":""}],"ratingRecent":0.75,"ratingOverall":0.75,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIDDTCCAfUCAhABMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYwODIzMDkyNTQ0WhcNMjYxMTI5MDkyNTQ0WjAdMRswGQYD\r\nVQQDDBJhbm5vdW5jZW1lbnRjZW50ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw\r\nggEKAoIBAQDPx4Hp1HdBo5v7bDEiVcv2UrVjNW+fPPKS/5rwbagtPcE/1v3WDcwX\r\nvFwaXk8qCn2UpPSQ2b1rTuTDm51G1ZmEZhNiio+rBfEe9F+3tLsq9lElqIPKhkAq\r\nEUVI6dcN+jSqvLmLhuwloEoQQSYaLrX75mY3lGqTb83h1l2Pk/brVixuVf4vJW31\r\nTgeieuGKnC+keLzKOrvTHffJakU8ktwB2Nuu1o+jN5a7u1bxKkP3LjEWPjq236hk\r\nAoOcW/wi1dUEyUKUZsZQeJyvTJh1UXdLHKwYywtUu1/VLZ1IUtNyPBfiQ8ukPp3T\r\nTnSSmG3ZnvsfM6DmAvLZ8bBQkMBzEcTLAgMBAAEwDQYJKoZIhvcNAQELBQADggEB\r\nAAB3i2NgiZ4rpNag7cXYdaFxAxdDWnke1+LX2V2R3hzGmx73/W6cKLpo3JBn9+zT\r\n1aEjlqkt0yHu4aAPVYQzOa5zIV8mjP84p3ODSyV9J8lfjFNXT7wdA8+9PVx3lVki\r\n2ONoCNBh1kOxnxI4+BsMlQfF00ZbBSuGcMm3Ep3lTFWXzuUn3MQITzPwkL5LkW6a\r\nsli/yAYQRTVDsXD8A3ACYT7BG31jGxyXtIHzqCci0MhZFdKKayMYkwfjZchIUtGN\r\nJJoU8LQoHwGRtp3wutk0GlFzpEQEvSsn/Lsvvot5IfIe46tnzA6MVj5s64s5G8+Q\r\nphhXFlzXqO/VxquPdbfYjvU=\r\n-----END CERTIFICATE-----"},{"id":"ocsms","categories":["tools"],"userDocs":"","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/nerzhul/ocsms/issues","website":"https://github.com/nerzhul/ocsms","created":"2016-09-19T21:56:04.745481Z","lastModified":"2016-11-11T16:29:55.864273Z","releases":[{"version":"1.10.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0","minIntSize":32,"download":"https://ftp.unix-experience.fr/owncloud-sms/v1.10.1.tar.gz","created":"2016-11-11T16:29:55.856768Z","licenses":["agpl"],"lastModified":"2016-11-11T16:29:55.947926Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9.0","signature":"hVzbkmmtJCtiOkZGe1mkWElqS3IPQ8wLtSzikVvoKmcg+Zq3YLQjpQWzy0t3UVjo\n9I/BfnL0bF+kjtGc9xF6M8IQaFqPrfJmN+lNT8WYIKLI97TTsLmJGg8Q8PAux3nY\n8/NxMjWdByMw9nVBClKo0o9eSW4+EnaUSJ62Gl/XWjq728kbB16WZm+iesk8LjJJ\nqqAgczWGwz6lkZTCN5o9n0a/YoLJTf4iT+OItHZyS609Cqaxx9CAmZPj/Xn5g1fm\n8hqO2ITAXLoBj4rYS/QsZTMcubtGkJ8fq3XYKVSv2UXZfvGsNWbbGV7puKN33uWJ\n5MrdoMlJ8XnJRPDlCBcb00LY+AB+hAMooLnNy765/Ew6ztp4KNLEPWGG+Ut8/Lkk\n0jIULl1RF/FjlW8P26NfwH36K30RCJFY06OFcWnxGBkkQaNFORDIsKcqTAxkl4x5\nnfKBkNdQZppCVfOSKOZj4NkWfWx75Ouq1S0QksmOsMZoOcjy1TbBKR8h6dt9DQub\nWpYBL0QwyQShGp0Vb1qCKkP69ZQAHVUJNzIFPz9LyoguvFyv8iZmAPLYDnFBvlf2\nnSHtA19rnJmZ4H7RJ02r6BdkstxISvEiHU7RLjNQxcb+DptIWX5C03wH87HTNIhr\nvptPorEoSY1KwW9fqUvvLE/c+vfkr5cvIEwZlyVKVXU=","translations":{}}],"screenshots":[],"translations":{"en":{"name":"ownCloud SMS","summary":"A app to sync SMS with your ownCloud","description":"A app to sync SMS with your ownCloud"}},"isFeatured":false,"authors":[{"name":"Loic Blot","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEADCCAugCAhALMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYwOTE5MjE1MzU5WhcNMjYxMjI2MjE1MzU5WjAQMQ4wDAYD\r\nVQQDDAVvY3NtczCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANqZVIzM\r\nwBJuacuvgYKr2KnXuYhjKjZ58nfspSebsaGLr0ifBbo8L+NH5eaynnLCNhpegmu0\r\nO8D+KrbM1LtIkcdg1/eFpN5dTc6G2OAc9H9stmHs9nroF6MNhszgdZCz8Q8xkSoD\r\nGdSm8hdPg5GcfLrH27UilGtzdQlWJ1DralLMt3l+SfGJo152c/dc+e6SuT8+EbY2\r\nCeLdH5ImasXNpUgY+tAoEt2ZvhBrUghykBJTJVOjwL1jGLT37ybMtV4FBKo6hpeg\r\ntq/YzEk1ijBAC4pmoNWixDKCdolpVJVz0fijI9mlda3llurcp8eMhxfYJ9soXLHp\r\njvLX02YY6RfPcyy48uWVk4IEt9BvZWEVAAp7hCGA2yXrVSsR37E6sDbLsBcKav9A\r\n6dkGAgfmGkr2WT6O1/EhK/MakmnYO4WD1B+E7PnxtP/wOa+aQBmntQcd7igDiwzG\r\n6h05NYAWcRhqfZ4KWYsq0t0SezMbuHOhwzzi22q8wijC5YZbmhKSh+b3N8XwYKDi\r\nZaw+fSahPbRWaLyR3wn9zh7vKCwqrG3ugrNo6CtyoACAnmxKZ97ROFJIQTe3ndLL\r\nmv7Wy8iCZLhRYUaW/GKrF11AFwBVec9xmvkgU+PIKq2HSjwi9sCF+pFyhVjmq29C\r\nmZEPKUV7ySIpNHXpsXm8kTJJfqjSdb2ECbLfAgMBAAEwDQYJKoZIhvcNAQELBQAD\r\nggEBABvn97e8Nw8KAscf6FX/nZ99rEX+3IrZxTC8fmBgNwAvlbF2A+QZQcFI4G9/\r\n85nHK117+u7XDuwWl4QG3flWlI0hDE59Ud9Bd4AiTQ12VoXlNdYoTg/mXARxVozb\r\nKYqZ+1xRQclZKb2AqW8YiGo18okIKovn9VVRAFYPYx4O3Ve1FjgfsaMlIZLiXUFm\r\nkk+2qWo6kYsdU9FABLo6izx7RFOMbnYNre5FmDrWP1Dga/U7ErK/Dilh8g9b3HrP\r\nwP8OIZhdtFWw21wDTfyqrb9EhC/tsjPVP9u+bqyognHeiMhjbVYRbSvz5o8T7Mhj\r\nbxalCt4/LnMIfMwVyIvye7Uy2GY=\r\n-----END CERTIFICATE-----"},{"id":"rainloop","categories":["social","tools"],"userDocs":"","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/RainLoop/rainloop-webmail/issues","website":"http://www.rainloop.net/","created":"2016-10-20T04:17:37.217555Z","lastModified":"2016-11-18T11:36:04.309739Z","releases":[{"version":"4.26.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.4.0","platformVersionSpec":">=10.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/pierre-alain-b/rainloop-nextcloud/releases/download/v4.26.0/rainloop-4.26.0.tar.gz","created":"2016-10-20T04:28:21.491747Z","licenses":["agpl"],"lastModified":"2016-11-18T11:36:04.619927Z","isNightly":false,"rawPhpVersionSpec":">=5.4","rawPlatformVersionSpec":">=10 <=11","signature":"nTYIVSB6mIwKtXIrKoVGsOGFflpLjed8jFem1VLQNtXQj4bztnNrdc4YaPIn0yzM\nyLpMSqRDNzdYNFuOeDiyKLPJPTA++MotLCNjEe7kxUekek+m+qzgnGBdcT7RQT6R\np9xWGecnVx94d6aA55uiRhgQRyHpdDMMLCOz1be+HvpwHy69DRFZ1+SPmGUt6eW0\nu5yS0vHCu1K22cbrVNXFKjxAOlGcIDm61oQuz7ycl3uAujZO4rZbWt55jilgKGak\new559A5gTp9W+j+TWKIcg6LIZ9zLRlGjcQrWJrsc+OBZQcqiYimSFyO6HhfT9TPS\nPof//I+dSsd+H0SRGGeL8DvSnK+NKZL1q5EX5pziqsv6nZFITpCDwmAN+I8AnXXL\nSNkFi53M8RZTOABpD2x7YPYP1cEvwrRweqV/C/oHcYnpfh7D2DjFeWwXsjeAXrHY\nhgFhPrg+7rf7g6UmJFOCp0dC9sBdyQ3KtJkv7bGqPr854r2cdA7xW0QHWQ2in9qQ\nLhIczc32ECi3ZVVgyF8zyT4Y/3MRS05oX3FHvHyt88mjni6bVaO78F7ZRSha8gHh\nNOAkku7AMXPvUCHaZP2iVCCoAViEso8GeR3O8xh2G42Ai61RLYwx8LB1+23EoJTr\nmfFuRYNSg+qAKCokXNnh+lDlwu4AkaQo3vtKGPXvU7A=","translations":{}}],"screenshots":[{"url":"https://raw.githubusercontent.com/pierre-alain-b/rainloop-nextcloud/master/screenshots/2016.10.20-screenshot.jpg"}],"translations":{"en":{"name":"RainLoop","summary":"RainLoop Webmail","description":"Simple, modern and fast web-based email client."}},"isFeatured":false,"authors":[{"name":"RainLoop Team","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIIEAzCCAusCAhAXMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYxMDE5MTkzNDEwWhcNMjcwMTI1MTkzNDEwWjATMREwDwYD\nVQQDDAhyYWlubG9vcDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANqB\n5jnF9qZ/qjckt0kRjpHCOMtJumW/KiQoMeNP5nGv4ad0DS3KemOapUef8Zn7qCYb\nMnODhK7HBwPifFzI1j8bnT2hP6E0geFLb0MdN59d2NF0n4CCs1+BnepQPJ1kFbPK\n35wQRi0RDeTf/GQ+/owEVCU9a9W1P/VUXk8Z0vMoQxCXEdRqnB63SgsKl7DB9G/C\n4SYrgGor+OHVGl4ntMZhJujiM996DttrNK3iZRGkQ07L+lfUIwQ52XOhQNRdic4p\nB03lw7PpChwPGMv/EEvdR5HpCJQBJniqJbbu3Jh8bMBKTE/8fCzN3vMXICB2g3Bq\nlKkZW6fnJRGsrZ79fsQnl+WBPNSrWRLOxOfe1fyCFV1ljFB4nTH7uF3pC8ZRgJes\nkHIESHz3GJm28hn4+17ESMGHBCbs7L9FK2GY31cobU0VRntLxpSG+d9njbIAgMG1\nS7U+oKVFQhSVpdXNOaUNqhcQ3HkbQTLEP0k53A/lhLQb2+KPd8nntaELjwNyrmZg\nsVMgHj/zdlvrbguZjZFzUzDBFvkuv/5M58lNT/D1C6ufVp/R6eLsYI+nnk1ojAjz\nl7N6U8X5SXpD+Bm7+Kn1PH+bHl7cViCx8oXJXO2RhP+COXckw7BDZKtjItYHNG7M\npFwgYqWpvCu9LN6IN5a/eLqSI76dOOP3iYbaTH+NAgMBAAEwDQYJKoZIhvcNAQEL\nBQADggEBAGB0Vq0l6ndGTgNbZxSEFyBR3u3tiR3pWK81DYjsui7qBoO6P/BaGmf+\nraSwHPaBOwA9XNS8jcGLh5xdqY2p/m0dTS64xNjVL9nweWsG+FwVnPANo8C4nXdm\n9ajJ4cdg54stQK8qn1uh/xPcd23GKfYJazjYSwYmZ3pXXdzlGN9NxkeYJQxJ6B+5\npzAeVGiABI/e5URpxzz2UayRX7EE+vtpe3B84hzkLqsq0N39ZN6KLfaTyEBGLzqE\niLYeXQTV0XSRs8xVt+iyGlj7nPkv2DR0oCqRpWUFWeSBI//niDG5WxS3qg8kacSW\nfDSYhSN+IjrnIkwNtc8V9t7/GeQB5FE=\n-----END CERTIFICATE-----"},{"id":"richdocuments","categories":["integration","office"],"userDocs":"https://nextcloud.com/collaboraonline/","adminDocs":"https://nextcloud.com/collaboraonline/","developerDocs":"","issueTracker":"https://github.com/owncloud/richdocuments/issues","website":"","created":"2016-10-31T08:55:45.631429Z","lastModified":"2016-11-24T12:13:53.905352Z","releases":[{"version":"1.1.3","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=8.2.0 <9.3.0","minIntSize":32,"download":"https://github.com/owncloud/richdocuments/releases/download/1.1.3/richdocuments.tar.gz","created":"2016-10-31T09:03:40.389355Z","licenses":["agpl"],"lastModified":"2016-10-31T09:03:40.439510Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=8.2 <=9.2","signature":"s5giQeiU2zwV5X6FmxWXiG9LtNDeKBlFqK+hfvGNbGZ+nic77Y+AnXHodV4lb3Ko\n0C0ThFLuafaZRdp9rBIN2K/acCfCYKJewGuYErb7FlEl+P9J4OQbb9pva0htZJw6\niuG5eyeTufi5MKB4vuj4+jo9zhepOFAtZMa7o+ZCfJkt8vDBuq5AXxomEiZRtW+n\nf9PPUnq0z7DJVwINhHvvBZJlSLjkpJ6VIHAr+/ElWr8O/mDKq5S5ohbvpDcPqR7b\njnsBckFDLFUz1FX9dA0JCJEKMMfkcfGqZcjH17NdjKAxRW2soN5cEKluu5MkOhz9\nFEPKfshzbrfUIm5MaFGv6w==","translations":{}},{"version":"1.1.14","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/owncloud/richdocuments/releases/download/1.1.14/richdocuments.tar.gz","created":"2016-11-24T12:10:13.337165Z","licenses":["agpl"],"lastModified":"2016-11-24T12:13:53.963638Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"prDGlfRPxqT6LP0BsAFPwGww7P4Bngha2N4u5B6+F02N+RVOjGtTcXKqvM1KjZb1\nCo7qJvgJmjpvIvDmB+rup02i8ObfwP2ct6UdsD7ouzOWJG2sJANXK31bHyvOmQ2h\nvKu5eNcOkf+WFyFKYi51TbsfWn2+1Wge3WWujKAVcEvqtcOOz+uMWNtqzBptEupk\nE1aaRnQfTx488YB8Ubul06LIY0PNCHgGCWPgy817tOVT7JA+V0P0FFonl/PXE0dr\nWgtxRJmvGaNiFzYq+kQmdKMfayZTm3kdVgP0W52t5wp878K0i4s2KPg5lANvjTz7\nDCT+VV2IGIE52o4RpMUGyQ==","translations":{}}],"screenshots":[{"url":"https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-document.png"},{"url":"https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-app.png"},{"url":"https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-presentation.png"},{"url":"https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-spreadsheet.png"}],"translations":{"en":{"name":"Collabora Online","summary":"Edit office documents directly in your browser.","description":"Collabora Online allows you to to work with all kinds of office documents directly in your browser. This application requires Collabora Cloudsuite to be installed on one of your servers, please read the documentation to learn more about that."}},"isFeatured":false,"authors":[{"name":"Collabora Productivity based on work of Frank Karlitschek, Victor Dubiniuk","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIIDCDCCAfACAhAZMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYxMDMxMDg1NDExWhcNMjcwMjA2MDg1NDExWjAYMRYwFAYD\nVQQDEw1yaWNoZG9jdW1lbnRzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC\nAQEA1jk29m6JykcJ2Ld0YEpjPMYh6kwxY6GysNJnfkA/th7tPWL3+vBJ9oTYyVnZ\njwAE1Cqwfa9MyBKMZ2IdfIqtT8PeWzuFP7Ib942EdxUpwwh9F3lykeGsj0h4zQwX\nF9OooiS99PfLX+JpkKm15Ujb00iLB6xQmq0+3NeOT1CTD1ziJ1ueOcxBKMwaFp2a\nPuz3F5ywqCvpmxG/OBuOs0LI3/zStXhBNbUMxBrWblr7zaVNJXl/I2JCKj8Wah/H\nXUEEGbW15fAUP1f+90eQSxpEoCZDBHXOQCTJYzySGv+BjU+qlI9/gS0QbrsiyzUf\nO5lyvi8LvUZBzpBw+yg1U75rqQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQA9jU3m\nZmD0ywO3MUsG/GLigFtcWi/p7zp2BliR+NpuY2qNFYDcsIb8ZUudmUc/cJRRctzy\nAPaLLj/d+h5RFaxjTVvim1PSe6M7urK/IMSvyUVYCeQRYpG8ZJixKTCOVIBaWHMz\nxTfc51tm9EPlpJpK6JtaWrYYoWGE3k9sINdJ4JkvKkE2CBAqVhX6ZGyEQ0bnEhtk\nRu1DXn+LW7TJ4NZ8VtLWvmW/6Kfmi7dQ1V++Kmn0lO5ntRt5altePbStCHC8bhGp\nmyBOrjhrJgLIwvgH26MYZhdiSkFzoE38nMPZdrUmUDxcPCwucWJqgzDPudguFthj\nWCVZ3TTG/2z3+tWM\n-----END CERTIFICATE-----"},{"id":"ocr","categories":["files","tools"],"userDocs":"https://janis91.github.io/ocr/","adminDocs":"https://github.com/janis91/ocr/wiki","developerDocs":"https://github.com/janis91/ocr/wiki","issueTracker":"https://github.com/janis91/ocr/issues","website":"https://janis91.github.io/ocr/","created":"2016-09-19T12:07:49.220376Z","lastModified":"2016-11-21T11:22:21.024501Z","releases":[{"version":"1.0.0","phpExtensions":[],"databases":[{"id":"pgsql","versionSpec":"*","rawVersionSpec":"*"},{"id":"mysql","versionSpec":"*","rawVersionSpec":"*"},{"id":"sqlite","versionSpec":"*","rawVersionSpec":"*"}],"shellCommands":["ocrmypdf","tesseract"],"phpVersionSpec":">=5.6.0 <8.0.0","platformVersionSpec":">=10.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/janis91/ocr/releases/download/v1.0.0/ocr.tar.gz","created":"2016-10-24T06:50:43.283900Z","licenses":["agpl"],"lastModified":"2016-11-21T11:22:21.269108Z","isNightly":false,"rawPhpVersionSpec":">=5.6 <=7","rawPlatformVersionSpec":">=10 <=11","signature":"CBJkCIiUKyf2NuWfz2zJ3grhf8p7wJes7DPV/OxUzhlxIH0Fh7K54+U5A9JOOi6f\nWPhjXG1ylkyIVY1glr/B8svWNsD4jAclpnUi1/9ZW5UPT8LnRBfTbtF9Uoj0OgNs\ntsGQYbpuREoHnjbJWTRe0kq1OsOfX44xuf8PuX43B+lpQPW4iRSSz3ZIhdPcDGq1\n7pyqQM7gdKhBQ6/tOiwd7Enyt5Hi4V6jhwhUOCYeTNiLD2V3yKL+qA9DzpXUfNNw\nLGTjcaMrifibHQIZBZWbPPMmCfMJZ7GO9oR4gWHwkhWqt0yVWAJXAHJBLd5vXC5I\njtRTXRpHO/k6Dtqem8tZCVoDE5MAC7fDZ/0XzoFiXHciP6MenVasVcXo6xJOJc5y\nGsrecNftUEhP/ngxA6lMBVkLmmdpiexVisvsavPi64i34OUA6qOuxjgNVBDwg56i\n2lOEVvHa3nn0UX7ZZoQ/Nu6Mz7J3Hx/VDlttPuWe42eeJAphyDGubT1M62gW8dVB\nD3tJOF7spnK6I3BhVLviou/zs30AIRVBDTU0Orzx78cbInwy6/vyJib2a1olAaHz\nv05SzlQRnBWM4jYBe0mA/2ds9AO6VrXGrT/iLlHemj6JYoGBM185TGewA7OJyX3a\nHSlSDqaremmi+aS3onx3AKhXykDxTRkMVarePwTzzFs=","translations":{}},{"version":"0.8.8","phpExtensions":[],"databases":[{"id":"pgsql","versionSpec":"*","rawVersionSpec":"*"},{"id":"mysql","versionSpec":"*","rawVersionSpec":"*"},{"id":"sqlite","versionSpec":"*","rawVersionSpec":"*"}],"shellCommands":["ocrmypdf","tesseract"],"phpVersionSpec":">=5.6.0 <8.0.0","platformVersionSpec":">=10.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/janis91/ocr/releases/download/v0.8.8-beta/ocr-0.8.8-beta.tar.gz","created":"2016-10-10T18:01:16.076330Z","licenses":["agpl"],"lastModified":"2016-10-10T18:01:16.169733Z","isNightly":false,"rawPhpVersionSpec":">=5.6 <=7","rawPlatformVersionSpec":">=10 <=11","signature":"uEvhHfQCrzb6z+QuOoO8rYXiMsZFkrFWEqDvTyOTSgFKvo7dVoj3EfDfaApgcKEB\nIM/SqjLSO0lNhrp8F2mST3twbvLDprKsfrDWKFE6eiH0yKl2aNB+cHWE27utARaX\n/QZBD114vbWeDnbaBa4b9OwtBXDqKJrnO1LmqSLFP8guAlVTkU1jSPkRTpmwAcAZ\nJA/aiN/D2LSGfiNp/YdeTuzU+gPINIs9dCb6+PPkyam8PCBaXUSSaW+c0lAQHln+\ntb3EXxZ5YXdjPWrpEyHvFLk1N8s/w615QoMxr5fEs1M8D29aGbcL/wu7LXH4X0Yn\noiWwIFbpfrpJQlrIFumxWZR74JXiNr9J7ijnQ7SjxdHCcrLxMdnZ2cwq4iD6PnYm\nnIojhlhPOqUIzsWYCYutLWDQbUQz9eyWbj/+7XL+5KjetUUr/MnCu6xJ27IqFbAX\nHc8KRCO+9I0/qMQ2/rCZXBMeo39MGhhkgkVl5YAKwC1IEN/jlfyVNXZwYlfcHLKj\n6aNQ4zN6gGOerWWZ8qXtOeNJN+qv0nmXUKrZdnZUAhxOdB4G9Ym+JujxJZ9yNIWV\nsiqAI9J+OIzCwv/dzZhaHadONoo/RTF+Fl6Hy56HyBtMehb8w9p8ksVediqf33yt\nFAE/tzKtNK5NiRd+8MZkq/GbocaFUv3C7Y6pLMpTE1c=","translations":{}}],"screenshots":[{"url":"https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc1.png"},{"url":"https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc2.png"},{"url":"https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc3.png"}],"translations":{"en":{"name":"OCR","summary":"Character recoginition for your images and pdf files.","description":"# Description\n\nNextcloud OCR (optical character recoginition) processing for images and PDF with tesseract-ocr and OCRmyPDF brings OCR capability to your Nextcloud 10.\nThe app uses tesseract-ocr, OCRmyPDF and a php internal message queueing service in order to process images (png, jpeg, tiff) and PDF (currently not all PDF-types are supported, for more information see [here](https://github.com/jbarlow83/OCRmyPDF)) asynchronously and save the output file to the same folder in nextcloud, so you are able to search in it.\nThe source data won't get lost. Instead:\n - in case of a PDF a copy will be saved with an extra layer of the processed text, so that you are able to search in it.\n - in case of a image the result of the OCR processing will be saved in a .txt file next to the image (same folder).\n\n**One big feature is the asynchronous ocr processing brought by the internal php message queueing system (Semaphore functions), which supports workers to handle tasks asynchronous from the rest of nextcloud.**\n\n## Prerequisites, Requirements and Dependencies\nThe OCR app has some prerequisites:\n - **[Nextcloud 10](https://nextcloud.com/)** or higher\n - **Linux** server as environment. (tested with Debian 8, Raspbian and Ubuntu 14.04 (Trusty))\n - **[OCRmyPDF](https://github.com/jbarlow83/OCRmyPDF)** >v2.x (tested with v4.1.3 (v4 is recommended))\n - **[tesseract-ocr](https://github.com/tesseract-ocr/tesseract)** >v3.02.02 with corresponding language files (e.g. tesseract-ocr-eng)\n\nFor further information see the homepage or the appropriate documentation."},"de":{"name":"OCR","summary":"Schrifterkennung fรผr Bilder (mit Text) und PDF Dateien.","description":"# Beschreibung\n\nOCR (Automatische Texterkennung) fรผr Bilder (mit Text) und PDF Dateien mithilfe von tesseract-ocr und OCRmyPDF ermรถglicht Ihnen automatische Schrifterkennung direkt in Ihrer Nextcloud 10.\nDie App nutzt Tesseract-ocr, OCRmyPDF und den internen Message Queueing Service von PHP, um so asynchron (im Hintegrund) Bilder (PNG, JPEG, TIFF) und PDFs (aktuell werden nicht alle Typen unterstรผtzt, nรคheres [hier](https://github.com/jbarlow83/OCRmyPDF)) zu verarbeiten. Das Ergebnis, welches jetzt durchsuchbar, kopierbar und รคhnliches ist, wird anschlieรend im selben Ordner gespeichert, wie die Ursprungsdatei.\nDie Ursuprungsdatei geht dabei nicht verloren:\n - im Falle einer PDF wird eine Kopie mit einer zusรคtzlichen Textebene gespeichert, damit sie durchsuchbar und kopierbar wird.\n - im Falle eines Bildes wird das Resultat in einer txt-Datei gespeichert.\n\n**Ein groรer Vorteil ist, dass das Ausfรผhren und Verarbeiten asynchron im Hintergrund stattfindet. Dies geschieht mithilfe der PHP internernen Unterstรผtzung einer Message Queue (Semaphore Funktionen). Die Aufgaben werden somit getrennt von der Nextcloud in einem eigenen Arbeits-Prozess (Worker) abgearbeitet.**\n\n## Anforderungen und Abhรคngigkeiten\nFรผr die OCR App mรผssen folgende Anforderungen erfรผllt sein:\n - **[Nextcloud 10](https://nextcloud.com/)** oder hรถher\n - **Linux** server als Betriebssystem. (getestet mit Debian 8, Raspbian und Ubuntu 14.04 (Trusty))\n - **[OCRmyPDF](https://github.com/jbarlow83/OCRmyPDF)** >v2.x (getestet mit v4.1.3 (v4 empfohlen))\n - **[tesseract-ocr](https://github.com/tesseract-ocr/tesseract)** >v3.02.02 mit den dazugehรถrigen รbersetzungs- und Sprachdateien (z. B. tesseract-ocr-deu)\n\nFรผr weiter Informationen besuchen Sie die Homepage oder lesen Sie die zutreffende Dokumentation."}},"isFeatured":false,"authors":[{"name":"Janis Koehr","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIID/jCCAuYCAhAKMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYwOTE5MTEzNTAxWhcNMjYxMjI2MTEzNTAxWjAOMQwwCgYD\nVQQDDANvY3IwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDDpXiwec4f\nXAT//7YBPSb4z6ZsBJSMfBq0VTL/HagjJnQ7BL+WagzWlS69IStNDqlIlenamYRX\n4B40heJIUinzYKjTRbr5UAw6MX29HibZccm/qgrk36o1XTgIsoRhmvSxbXDVIo1k\nbDOJN8gc2Gvswa8X+uOe9pfcDgAdqGxOvFnoKW89GnB01pCNT+xakNErGAFqVLsr\n2AeademAZnbxJ1cB54tQn2Bygb/7DKKY8EmFfIq6/27n9Jbph1FG9HIlWRT4/M2H\nU2pG3cCScWMEBPsW7kpfpnzLk7Q30Oj6k/rEYjJgmNYgg6oVnn0D9uRmhBYBnGyx\nMab1ilsK53lyuzQY0pmU8V5ULqpnNFAK6DVFfofEamDUhBPO+TZXEA5cZmuULRpf\nQQXmGpUQSyV6pS9WirMIqXFp9wmQ4vtjMdhu/6CP7cmtYZdq9uOhWEHbQM0mZUkb\n8hMjeItPx9XITI7Cge1JUOI8ZIwiB3USnQXcMd3v82l++/VgqHB7s5OaKPhygsWI\nM6RCoBcGiuQB5/fEUOg5ACOpGVyJiBda0Mi57AdoxdJmfnr7Bxcf2tAWIJL9Y7T3\nE1+V2BMxJOWwvVz26Cq83F41yXK2hJS+SbfQTqNUR8Cfh50CS9POvgRxNrJK9yvI\nkKle3ITRtGVM1XU0njWjnsdGg3D3O2mmjQIDAQABMA0GCSqGSIb3DQEBCwUAA4IB\nAQAbFddMbgfPI1szT57V1FKZrOrdYqQ7qjewlIQOzshGydbMtqS/9XL5hYocJCMt\nY6w+C/i6iEzO2Jx8D/k4rcZMXoVR6y3ZvO0Ke0gzSRsU+5eYj2FK1VV+cNIQW5Iu\nCYYIVa7pVPVHdeQH2Bba680bLV0HMF6b1fI9IwkfdCAinvCYZLjyEXZlmB7YjyA8\nHR7qPCNz4uG2Va7mlUHE3UYUYnlv8JFOV3YdbVL0nxhWwIdzSri5sxFIhdlabpzY\nyA1z/MCBEyTRo80jxFmL+MpwbsdbUJi7Qxlnd56zb6HHDGrLHXZTh9LXgyVbnhWL\nkxomWjIXQh4aMHQL4QF7U4EK\n-----END CERTIFICATE-----"},{"id":"spreedme","categories":["tools"],"userDocs":"https://github.com/strukturag/nextcloud-spreedme/blob/master/README.md","adminDocs":"https://github.com/strukturag/nextcloud-spreedme/blob/master/README.md","developerDocs":"","issueTracker":"https://github.com/strukturag/nextcloud-spreedme/issues","website":"","created":"2016-09-27T08:43:07.835196Z","lastModified":"2016-11-21T16:51:23.703819Z","releases":[{"version":"0.3.4","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://apps.owncloud.com/CONTENT/content-files/174436-spreedme.tar.gz","created":"2016-11-21T16:51:23.689599Z","licenses":["agpl"],"lastModified":"2016-11-21T16:51:23.826509Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"Mhy3hXeGWlIujx1Op39MMRdqHYOo360BCwr4FPWoTNNggH3aS0gWlh48DAfGYK9W\netNiOqIuRyA0NrVlsqR2vDILgFtODJSbKPyHd3PQn3hcGsjogjQ+dkKciLNLinw7\nOhbv6aDdRFLBeRHpX/7wOnWL5W3ko/gyn0Awvi88M9+nC5aARtqncQqPy2SxDGzH\nKlOZHSNDnEQCGMhA8hNWWKdVwNUJHod/wmBWpW5QVNSJq5DqrKZcNwpGM2UUJoql\nEqUMwDXk5uVH5r5k62Tr9kguDWoUEG1OqQSyeMY24AmA64tq/HSlAdZ+CX32bc4E\nZvm+n8poJBrdSVmWEaa4ZfYaLFdOc6Kcuid1B1Sv9kPhD9WD6T1sicdzjDzcorBK\n/MLReCuSb2E8aPTnFWRoAZ4xCUGs1IXzX5fmxI8VdzwR42R6RhGJ/rqMuZRFenZF\nbOks45K5gE1da4QpkYOUQa3GVMNPqPiT3CqjmJ8tjxq7bGpb6v+YoCLACjjPpPZL\n2Y28qLxwHVaINDFUUxD75WWdrlulRbqHwiSw8jolP9qrpXhDuLAqYam9tRwV5K5R\n8uNawnFwWkicBEYkN/WtBTouWzehOPn38tHXov6SyEyD6lkuxUBZrsGQ2ru+t33U\nk0kKCbV0GFw43I+3Ji5DiB4TUVNZYVoPG1B7Qve+UfA=","translations":{}},{"version":"0.3.3","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <11.0.0","minIntSize":32,"download":"https://apps.owncloud.com/CONTENT/content-files/174436-spreedme.tar.gz","created":"2016-10-20T09:09:26.520692Z","licenses":["agpl"],"lastModified":"2016-10-20T09:09:26.666738Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=10","signature":"D62Ck7JUnrYbrfFlX7xXVaYUMZIh2acmykIKapqfemD/tuX5Bvb08GYGTeFG61MA\nQzsqcIylDfGnC1UJbf8yWEX7PbyJD5w/R4WlbFv34njDvM8rBs4HpzSjkqQoykOF\nZpYAjH2ydfKqtZadgoIRm7et5B8X2AeoGg11ec52DId5t1wAEBcDIv824CDBUt8t\n0pVY8Z8n1MUYwU7DCjCbPy23br2+EBODFCHp+cFfMBLg3F0BJI5nY3Q8ku+0tqMR\n0NDxQcscNZ2Ck/wpVDWylfhpS+ICIxSMiyq7urP593mRrK3399SUyaMqDfgl/pxo\nqTzdBxHLaAqcnKZYglbqp+Gxbyj4teqCod8TiSMlp90VaxhC72ACuVQQRWQKuTNI\nZeW3YweWB5d7VErqBNmQR1tGnX5YFFHiKo41fVDQFsrOqHx4zP6AeU3nkl2ol/r/\n3pg553so1MOxMkyLEhGYGMfrdQqVEtajNWHUdj3B73LS+M3jcjBFIdOD+AGXPtDX\njCRymt07c1znhkL+aT8yY5SHMVbKBZj9mExL49hcLjAYYc4U++60uq9MFH5r9g4T\ndph+yT6VVEM/UH2HjvKsHv2wm937sNgG3EXQdh79JU8nCXIz7cVrJ8f5/9r6n1VP\nBbjtfDAPEjmfVCXX2gmgLuZHV+GMhLBS9bTh+61AhhE=","translations":{}},{"version":"0.3.2","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <11.0.0","minIntSize":32,"download":"https://apps.owncloud.com/CONTENT/content-files/174436-spreedme.tar.gz","created":"2016-10-06T08:14:05.212553Z","licenses":["agpl"],"lastModified":"2016-10-06T08:14:05.278533Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=10","signature":"X9zXDyMBPoXPMpZ+XXWK3MLufjY2MG8lJ+93LiW3rv0iq9yd8PafK4IvP9czO6o9\nf/vNilq+1mfl6mjTvL6QF5+sySlzbRGbT3uTBwYXyYL07HVYgl1ZLrwe0kxvxqaW\nxTvPem7+HzwClI3VnWc7ylQfzGrcYIaSIg7nNq1GOHocsgZVNyj/nVW/eQx24MjZ\nuLzZs9SJqYoBGq+mo63vRswhqv5OzGebo+G6dHm0hvRSOw9qsWCDWBugiSRU8zU4\nD9PQ0e8WbyrIrQhBoUvvkuijO3zCySx606S1HUyaHmbJzMc4Fbpwz6ggmi6IRBbT\nFBKB1DWJDwN/7mY4fhS4KhircVnAHDqiBVCTu5i3pSfMPrwFymcmbn9OBuFHAFuZ\nd9PZvWQg4v32w+Q/NNvZVW5lRi+l0w5DEqNREaj79hljk2reZMaB65lvtV9NCYw+\nHmwWqsGqZ1SgGZuhYkOzEIkCfJ2fF/VpyavJ4X6bHP9yYdkt1pxnSSoZ2HC8mkG4\nBnPf28mEXRcY8EJv0rEePqKSBIhAt8yfEW+joH/8nupe1qOdfPvP08ifLad5m76s\nt23UzlSljzq9kVO+d16z2uagKomN9USZaNnJcUDVblfjvCPpdiHLfRPEJnRsDZCm\nNffFWEMcz+TWmwBboZgTRO9v0bPDEuwfCCEW0zy8rT0=","translations":{}}],"screenshots":[{"url":"https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/conference.gif"},{"url":"https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/presentation.png"},{"url":"https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/import.png"},{"url":"https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/users.png"}],"translations":{"en":{"name":"Spreed.ME","summary":"Audio-, video- and text chat for your Nextcloud","description":"Securely communicate with your friends and family using rich audio-, video- and text chat, and much more right from your Nextcloud โ in your browser"}},"isFeatured":false,"authors":[{"name":"struktur AG","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEAzCCAusCAhANMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYwOTI2MTYxNzMzWhcNMjcwMTAyMTYxNzMzWjATMREwDwYD\r\nVQQDEwhzcHJlZWRtZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKLx\r\n2dCPBLIgX948BnOdLij0YyI2+FKD6uZOvzxMaoi3rlxNf8MJgraNMzTBWEXtxT5b\r\n7ZISNp89WEXhaQ1dwwCocodd/xow4Ek63m5nUvTZXsm+YSbMgrFbxzsBhYU7KuIE\r\nT/jhKdzYgemzErwwN/gtwkLMfPo3jkgg6c8NPPohYv6k7V4VnsqtJ0JS0kX19FqM\r\nMiNz9XkcncBHy9x0BSxy4+YnwbFcgIx/MtYKlBL8NkPuuJaB/6C1O+IPYhdEdnpX\r\n+RaIue71nSStOYOqT4YDqHAIw7EmqgA1my09mmK+0Pn92GJVEAEN7JGBSQ+F32RI\r\ndB3ivGAOVtUtVvJlepWdbHxj1xqeP+LCjWzHMLQjm0TyH8VqU4Cg/wxwAEFnBATH\r\naOaWwrggzY2d9KBo1mp0k71NArLbBdlHykFU4bgiSDWrXXMz0fZzLQVwGI0Eqcxc\r\nouf6t0kvrK8oKjrnso+FjBoT7lHV/H6ny4ufxIEDAJ/FEBV/gMizt5fDZ+DvmMw4\r\nq+a088/lXoiI/vWPoGfOa77H5BQOt3y70Pmwv2uVYp46dtU8oat+ZvyW9iMmgP1h\r\nJSEHj1WGGGlp45d10l4OghwfTB0OSuPUYwWR+lZnV8sukGvQzC9iRV1DGl/rREMC\r\ncQ5ajRAtO5NPnThvN5/Zuh4n8JoDc0GK4jEZsIivAgMBAAEwDQYJKoZIhvcNAQEL\r\nBQADggEBAGHMRbPV0WTI9r1w6m2iJRrMbZtbBb+mQr8NtOoXQwvSXWT1lXMP2N8u\r\nLQ1a8U5UaUjeg7TnoUWTEOqU05HpwA8GZtdWZqPPQpe691kMNvfqF64g0le2kzOL\r\nhuMP9kpDGzSD8pEKf1ihxvEWNUBmwewrZTC3+b4gM+MJ3BBCfb5SCzMURLirfFST\r\naxCNzc7veb2M98hS73w5ZE6vO+C/wz0GTsxuK0AoLitApT5naQnjvxSvSsjFPEGD\r\nsUNUEU2Decyp0jxLVnrrpz6Y5UupfBR0V8yAv1t5Od/mCKLc5DxHsDWiKOpsob9U\r\nJN+bdzJil2NNftihD4Dm7Ha7OS3O8W0=\r\n-----END CERTIFICATE-----"},{"id":"nextant","categories":["files","tools"],"userDocs":"","adminDocs":"https://github.com/nextcloud/nextant/wiki","developerDocs":"","issueTracker":"https://github.com/nextcloud/nextant/issues","website":"https://github.com/nextcloud/nextant/wiki","created":"2016-09-14T14:34:35.977699Z","lastModified":"2016-11-22T16:02:57.758477Z","releases":[{"version":"0.6.6","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.6/nextant-0.6.6.tar.gz","created":"2016-11-16T15:11:14.344704Z","licenses":["agpl"],"lastModified":"2016-11-16T20:39:59.030384Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"aOZeEeThyZ0V/vXBcn6c+Z0vyCsZcN6nfSJ8oWEea4zXh4g705Si+MFZESqix3M2\nOPCnA/U8eASwdRTAEwQJrW5ECmu1THXSIsrzQzc9kFycvyOGzCgAWtuu0ayzZD2/\nU5aDWlzpLHC1Czg9QJ5UnfZR0AfChWQ402N1YzGqMShdJv6AHXFrVE+uYnIyxuYI\noPJQBUYbQwthVUjpYwFwSxw50YU17gmx5RZ0Y0OPz3i/EiuEUrxopXtfDVYAuCML\npDw37LOTRQ2JqxSU3teALh8LcrwJbTeOP0n4bTeV+vU3jvtiaEoRrwfVrK41F701\nQymGXy1/EFG0kxPGS2dRNPBAXYLZfeoWlROl3D5BWlbsCcXKU1S+22yn0TEdS7x1\nY44x8jRKnBddDE7qkn+QoQYHNNcxOREsFFLmIoyCUpdNOdDX2PvTFUYkIqdnXaJy\noAKv2GkvWPQ0aiiBtA1i4oXuzvHW/M2wOrK7v7DCpNfILrD/sjxpljxcX082nRCd\n9P3iPd2hQ6yOM9fG21LVN74b6wggI81BzFf/xJPd4ZqYLjfeG/yqd0zaiMOzMm1W\nse+kc/a4iB3BoCNX3E942pBBzew4ya8LkCXdCHUUsuelDf1va1ikTh/G7D84ll9/\n2avNqQnUh3hgOnxFCLI/5VrbqxfSTVdO6O/LTuAmwgw=","translations":{}},{"version":"0.6.5","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.5/nextant-0.6.5.tar.gz","created":"2016-11-09T16:58:06.856332Z","licenses":["agpl"],"lastModified":"2016-11-09T16:58:07.139404Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"DVOIbLEVggiLkNkuPW+pXqu8WYT15unUsMoqHSw81NiU6HF0Nuf3XiwnHJJDDqo5\nyX+QyHADO4ZiQpvXhGigvwD2eS1jVLatAztyxE0tEQv5eBU/7R0jQYxI8YCnC/jE\nZDa0qs+TI58EkDek0LBzueVQqrLubKgGU9P+E9H8gbWi1JHvl/2LdY7CplPqaJ+J\nMRokobPntzgx9m4DZC1RsCoXzSON7o2gp2cmunPJiXVHPhMUfIfolGEbNGJ1/xdp\nra7Y7XkPnDx4po98a38UpUh1x/2m5goOV54em35bWbh4ShNDykiE5ttz6tOywlYN\ngxceSsStTKyqscVaOV2Xu6Ive0pY9CInvrSfRnRktIWBYDyWdbK9sJuqs/s69kqn\nKQ/SjzE2smw0zwOUMnSaz0Jzr1vdPFgNu2xDYAVQO5G03V+wQ5AhxuhBz5Xp5Fll\nLaOhymZLCC7lq0DUqkeTeQ2QCfiG23hvG2VUPsIqW7xFe2YzKHZVXi9JuH//Gwym\nDmJmcyZDMvNwNiObx3ZRKsZNH2XwbldFZ9nTpb9AafyoSR/qbwd473NewaDLRTiY\nLrOP5Wx1xx6DOkRmDF2l2iT1bSJ6eoAoWQU2I0aYRH9NAr2Ugd4f2Um4o61EJaL+\nRHT9cERRySEloU/NdgmZEOi+CG0rEu+9LC5G/jGlHE8=","translations":{}},{"version":"0.6.4","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.4/nextant-0.6.4.tar.gz","created":"2016-11-05T18:17:47.622023Z","licenses":["agpl"],"lastModified":"2016-11-05T18:17:47.678445Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"RdkvnhNjw+kAnT6Or3+N9FzAv9DjJ9BAlmgANMwZZcaqo1gZRFewsGD2Rx1KEb9X\numSC28tl2B5/3r/+dprVJmOnYJny/7+kDmI/d+vigKfnaQJOUZ0ya5+f72pFgow7\nth8fw9rX/3+zIBs2IeEN66cis8ioFq97BJDsnDMBDr7wl7CnFJjYe6eviWuiFTnC\n4sBXlYjHoaIRRu561nwAooV+WXmWsparYPVhj2cXdyP/CnWo5HSF5jA51WCsz7Up\n7a0URXdh85xmxEbZtnjUymTW2BIegdxj9Erbfiuy/m3ApgnP+DiEQRcM13J7pXqg\n4cgFOBSzKDZgim599WBW2uNO1ztnDYOzz47GXDfJhcdvKiZZoQpUF9W4LMRtheMz\nxD9YArO3j3d+VOInSYU2Rpvhugwo1LExhwnRdT4+cOZfEeq0VojiM7yBZLDdEjIb\nGdYUJtNWSU0F6cPab2Au8FgZymLrHL9EpGvxuA1oAwtRxHAgMElJG2O6Jp89gGl9\nh/AptypeTvzNEc9/Kg24ueBKqmSUd5a45pZ3gM2pNATJhUK7fzLb/K6cq/kEzZtj\nOPra1ZfP0/20u8VP32Rgw1cFmIjqt8DFzUmOMpMfyoJkdldtTwQtGk+yIvtN1zp6\nT2zDknAKA2N/rZ/0SJl8KxVVNLhQWtYBJ+rFAdapuxI=","translations":{}},{"version":"0.6.3","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.3/nextant-0.6.3.tar.gz","created":"2016-11-03T21:51:27.654342Z","licenses":["agpl"],"lastModified":"2016-11-04T18:25:35.697130Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"Hf5GB4xd+rVXzWvVpGbbF5tqmnI+DGHlNHdLYPImFLS/Z4K5wKeNp80E5sd/RkAi\nhyuEsdWHlGDVMT6s7oeCmH/ClyWqLNSz9VH4KYqyFgD4+usHZp9PrEeEKbvPDPKv\nD3eB7Ats34cWcpf4E1oR5wsPicgmdgIgb2uMXzc/1G9xUBRWzocwCstzjEEAB/VJ\nvJuHvhDTGG294P4gOb82MxKCQ8LZ4i1QXzOf/mLETOubiUbZtJgTReYvpdAo2Wct\nbdfDFw13LYZkCf71r9jIQ3PSPlIpD+0BwAlE1fi0Br9dP2JjIfiKN6CGVaki6O0v\nKR42jtcE9xXiAop0Ym1FYMWJvQUy5PFLMwYDfEd6CvfEFJl+fi+RjXNDNZcTyw00\nHa48sACoGzxwts2JknWMU57mwvi0Z4uwpE0cFp/PRzBsXmSlCzWHjJhu7+2qambE\nAabdP9nH2NvqJHUJyPsxtDSrSWCBY4CoL3wYu36UrIA4NepyudMPNe9fhKTEU0bg\n8DLclw6hYdj5p9Zj3OUuwOZLz6r85KwnooTsUjOYkBXvdUuHWkgONqqZlPMApS4i\nChRQ7ysHAinPyyzsvr0PR9g6J52CSCO/7qwSJy6yqSzuSWrbZUa4FVTcKIwWJJPu\nJ2XzB4rWVG1wWjzMM6MIvFbO2HY9upzh651OdOwsYvk=","translations":{}},{"version":"0.6.2","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.2/nextant-0.6.2.tar.gz","created":"2016-11-01T11:24:58.054892Z","licenses":["agpl"],"lastModified":"2016-11-01T11:24:58.151609Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"h8KgwMh2RGGIp7q/II23VSfE5Ibkha7p/C1kvIfG6QIIc2Zu/Mm3Oekynnysh5ZJ\nZuMTaeWbejbBAmlnxW+AwBWa/s2PoMhv7foVvdtg76l9/qr+9jGvUM7D1LbbBvAy\n/XW6JSrhhBZHOohdU7kwV5Xnwsn/NC/zUe0G4eZ+9fc9uSntkob9wnWvUs2daAeD\nY6Mi7Xt/XAIX65OIVTKfC6ah1SlbXgtJ2i2j4G32I9jRhmbkpt/UJEangn90fHnY\nQXNJ85OyV0aNMafNHoMSL3uLscdvjp0Hy8w4iBeavsRlCs0GiUoG1+YdwTwmC9EM\n4CjbMfRJ0DYK7u697TOmS8MQzk8O7f5THtjeokZlrom2YnV9t6gLvjnxl/+gXPdJ\nmgLixnA8P6tPsff9pquHKQZsvxjv6vVa2DVJc8VpcqJRih7yj/3V7rxesEP7MUnP\nznIOcwzTsKXHuAnvujpCwyQj3QtpQK2XJPQ5WkKgwbTdvriVJfnzPironhcHo1vC\nbuUDOdhL59aySChw2cZGD9lCWaxYR7I1BDDzWKNl9Qg0AZ2auyGUGTv8P2vi5qUB\n0CmnkzkZurR5ju6Nb9/2lcZvda7QJdIdMtm2Wnn+Ak/Z3Y4IehB5PPDP5/MMAhQY\nXE8Jqe0mGtiU/O2346L5IThkS58JlRmep4kYv+II9zE=","translations":{}},{"version":"0.6.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.1/nextant-0.6.1.tar.gz","created":"2016-10-27T21:16:47.066097Z","licenses":["agpl"],"lastModified":"2016-10-27T21:16:47.125641Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"axSX4Kz2P4PbKU676DibjPZsxk8hCIG3lLOmeMXoiBhp3ka4wJ8u5tNwTzgY8/MV\n3mjXe5DNttD66SqmiRNSPKbotYHVFFW3wFK+Dgh/++n/KTomGYUeIwt88Z9ecbuG\nNT6U46jFrfZBYzRHWzbgiJ4c7MCoid9cfmoB7HDuQSyw+E0S2vbLL8+jzMcIzF+5\nTh/sJEterXCyrWSciw/9x98F+4svNbskdEIvrOox3+K6UIhpsojqJR2+bQhG3rsM\nPerOb6J+bzHdLV1ZL/4nWEz1F30T7B08QxY/4pHD68JFQcdtzmHMIhXfCoRvWhN2\nVRnizx3IXBALY4F49Ql6bjsnr6BCp+LroM5RSQ3eupDcqejDJLbjPz8xfOMOwlx7\nz84Xd0MUyqaEkxg1ihsWLbPlYACUZ2aoDkSQUIbfZTTiov7eqTM8UBc/UqVID/LU\nyEW4gjFZzQy6kX76XRAGq1vebKFjCU63asCnVyJhF/YQVTu1hPGbFslkRKnYuh8W\ne4MeaNfbdjcSEX+7oTcPJz6V09pOPvukXL0M1m7lS9PhTisI6oGj8c33GPYp/DSK\n6SGk+ukbt1mwFuFKdTvAMxo1lk96D+pKUv4MX/ralaaoIAmwPTGsSQ04RyL454ae\nU6q8PApwrVyPHYwMBPtXGoQMyb2ZV9rylazYbKCQ8I0=","translations":{}},{"version":"0.6.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.0/nextant-0.6.0.tar.gz","created":"2016-10-26T01:46:48.419025Z","licenses":["agpl"],"lastModified":"2016-10-26T01:46:48.521063Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"W2TmbX/NbbfPPjIJLalO0kCDhhQF1pEohH/CxO9bY+yR+a5NKiTbpAhG2McqpTSj\nmgC4J8/thmwGlWGC+VW+KlpXzzjc7wCgMGMKViOpGD3pIy8p8U5MXTqVgjjrEb9g\nKgr9uErXzxJ5oDfkx8Uh1bUeBJTsAAivGJqMlhBYFGxw8BSB09sfOZytNxo4wbwZ\nNAcYP1qvkUQ8CVR0nInSTRfLvAp5+e/8xxyYZwJIWrdNgpoP0CxiwzKP/VSjBk/U\nsPU4R72UQnVZB0InRCeh/KNTwu1YiPkUKm+mNmt2hCfN7Fm6bY2rUMH7oa8KTkqn\nh52FhbaYRSAR1OPdC5RnHiQWlPh71gq+4Xqgp19Eawnl/QiVteVifSjNQZ+Ban8M\nRyw/PxHnzIWg/OAjx81Jx9mXjUIHSeUxMTJTKTp+lEqIAzjku0iHeU5UPGCfE+VM\nwmopZfnlfk2nLkUwjQXLCIcnZD1ME1m0h/H4Ad0Q/qXpBScUp47npkxg2b8zPIhk\n3aXUmNPLgwyXPWvAuaBK/WwpNefUnqWFns8t2Alpzg/EpC2PrZqciCNDcRFEycoa\nX+JsFyD7eYA7Dc9iIf09gXZX+tZ+Jinb+iPDwYrl1u/7IIBoBlUGCgo+cF7/dL9S\nc3vYeWw6MCH8Sv+ckgS2g726BfdN5EjB/8cb071b4lE=","translations":{}},{"version":"0.5.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/daita/nextant/releases/download/0.5.1/nextant-0.5.1.tar.gz","created":"2016-10-17T15:23:04.515057Z","licenses":["agpl"],"lastModified":"2016-10-17T15:23:04.576640Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"Pp3rC/9RmAYURneGpGit4HZ2t1qH9A9nwsUnGDgRuJ0akIii7CtJC+n8l1b9k73/\nhxMYnp2JOBu2HWKgFp9a3yeo1xphI5hOUdVQ1UZAWxIQyDI1FZVYDr81l7GCdkqm\n2lMxgviFADSYURCgEnAsj9Nt0NZ6LDcJZiJg3iPAjkDI0U+KnEBjtx/XRFqGUnfp\nCUZ/XLHh/hvoEitSHepTBDCMKkTNjbDEwBYfA2rAoz4zbMR5zKLU+1r1DIUgWSRe\nbk2i8TaTDVL4cbb6MhkGKwkujb+Atikvkpi45o7+fyQMs84c6fjjh/TZJaC+dMyG\n1GCikMPwwtEPjXtnLzynERAxJOd5mP4Ee4sD8ZrnzNUehpyFR88pwWU6r+dmiebb\nnsYlGkhIu2aIO2O4HZ4sUTsO5sfjZ9me7jsafhgJl6iG4IBeHa/L1MsSbhsh6mvH\nYsz4Xsluwr0QcFLmSDDQQYynyogKfJZG2xQsadM0GETWgXE44dVeRvMUsILfB4uZ\nmfKgd23SgaOhYC8m4bg5Hxnkl+xHJnyGZ6jhqg7bhuKwsoLymc18Vmjmb7a45HGV\nXbL5CTmw9yaPOBS3v7v91TnlB+0lhlzbKzZ0xIhY55qsTC76uScbTLwndPqNGaF7\n2koxRbJ3jcmf/Z2MLymdRi2BTZbZkPkxgVrSf9plaR0=","translations":{}},{"version":"0.5.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/daita/nextant/releases/download/0.5.0/nextant-0.5.0.tar.gz","created":"2016-10-11T11:47:46.191539Z","licenses":["agpl"],"lastModified":"2016-10-11T11:55:40.393000Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"qzQJSLK8nkrQedwwxUdhxL8bq3aXyppAlWJo+n3GqSvqA8uNTzl3Wsci0LsnBV0E\nDvDNW8K0enhl563F/bywQrDhgKl8jTX/CA5KCxqO9P+tvE80zAfMqiRnQayVcWuY\nSWX6RqfI/kqiWyN1SsFp2EDlas6eb+xfIoiJamlfsN0qzHYOFt5W77wmw2Bn9dB5\n9nwHHyC0z60Pf2pPduc/KuZ/971WrDFaIapL7Gm+z9XoaKSwUT575VtS+RNJkOKy\niBrwnHdc8x/62HPFOXsUYjCt2aEmLzPCQN8Ke5pd3596hm5wbAVzTHuxf2H35tb3\nljfGqAZ5AJX2Xd13d4aHXFdSEILwv6IFq2fx0hO3vkvFEoKF5oQ2t3hi++Mw/h8R\n15OKZCOC1bFH3gTwdshmnHSTSr3LxDeTF60aH16wpXcehQuJHagpb/aG8mPD1w+v\n759/mekqa4LYlqT9TLWTqX3UPeQXYIwcPijG84IvW1BDK1M4Mj2Vqsld4jXwG6CP\nORIL8xoQbA52dQI1Y19JXcU9zxIb6GaHYgpV0wejatsZRfhPv2Yd0CBShF4HY7aw\nnfcm88pqzOKNvjnLZjTFQwuJ0AUUSOsWhgZzYt8tATJ2KDZ+lxz+WAMGXJAC/ciY\ntrrglY7YxwJNLbYp+arE0sowZx+IOVaSZBvmUGHiEBY=","translations":{}},{"version":"0.4.2","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/daita/nextant/releases/download/0.4.2/nextant-0.4.2.tar.gz","created":"2016-10-06T10:31:12.482416Z","licenses":["agpl"],"lastModified":"2016-10-06T10:31:12.551117Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"QHJhYcBMi5HyPofshZ7EdcXsOfRrl7o48Y3BBBq8CkmYtFDbekghdJqjFbwwZa5u\n8FtgMVwssql/RSDNP6M2Zc/MpQ3K9gDm+DyxE5KRmtMEpzHB+oD+1DxP7kAoyW8/\nnBr5iiQSdLCelddMcTwbdxskLFUXIs3cFuLGhMvr8pdQOAgfxte5lolrj4/8EsJ0\n0yUImgIYG4NlgmvCygGApdpVaOcK7XVtv4oH+x43JmX9YZ3Ce0DQPYPUbFTCf4ZS\nS075j1vcnPx2cRFGxc+YpKzYVVYoy7ZdB75Hq+kaei/atxrTyV5+gcCrVPnH1RkX\n6G8rgu5l8FoGJYopi8/9dd8LsGLFx53CHMdEVob3tFR0WeK4TJAGJa403zE6S3hM\nxr86WCedmjuti0uOhSQr5AEVAoXZ/JUWQMMsPAUMuKEYVjKfmve6TlcNMC2oM5XT\nXcOf4OP3pcQq4ViN53o4Pj6NGSci6IzD6xLeAxKZUoTX37ArVKH6RHS5Najc193H\nRhYRnfE7D5YOr1u10HaZCFCVJif2MgMP0/uH2759NoRjXFowrh7Z6dW7JQG5lbHN\ne0jjJH1Y8m8H1peGGcmM0YxFiOVZ0ER7P+AxT4Cbau/cVhaS8vnPF2a2a6YFRiFS\nVH4aqazvvXrtifDr3lfvlyPCrP/570nwvOJgZGk+K/Y=","translations":{}},{"version":"0.10.0-alpha","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/0.10.0/nextant-master-0.10.0.tar.gz","created":"2016-11-22T16:02:57.740378Z","licenses":["agpl"],"lastModified":"2016-11-22T16:02:57.900805Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"kDO3xbPpoUdl2qo362tXfJIqKeiKE12M8FkMXbdKiRNzuQyvDOehQq3dErALZDOr\nLG47Tpez/Kn9Fsx1y4dQDx0w9SD3pyoqvjj1O6KkTYN6srpitQcj9EzEItCY+MZd\ngRSc7Px9MzxpFpgwtuThGVlSt5kLMd0vjWFLVcv7k07rZfWEsTwXd24INIDtlr1A\nC7hyLB777nEOGa7oAzx8nr+FJcIbmu9opVZk8AL40FOFDNBgfAy2AS9hGZreUmRV\ndV9Zh7UAR+RsEeO51xcU/CKqC8Jb0jL1gkYyUaQy16oe1HF9bRs1PWuNL5mYwsmy\nZNn0ay/a7mb7hxJbza1F3lbgBtodvbgUm7+So/QvaR29CSAqqoUXeQy6FfSBVWhZ\nYlTxdQfKcBcUPFO14BBk/O5p5iQaG8JCLJ/EZGDPDIVDMn7crGQ4oLZJv80eqTeB\n7ueDmWaD3gQ9j2XKsMk1uLSyY4unt9AaTofBylsKD1SjLhyxofGZym4jc2+M1GnQ\nyLcoEMSexnKuextu4nzrA0y5k3z9tvO07R29lwT1GFp6oGAakMLob/6XrGsm3YQY\nRQXgfXKFw8XmXBumqG8ayEIyvQ/O8nO6r4R1H8a7ooj6oWa3PhPsen+gLE0SpJPZ\nz3e2TLliwC4VtZp69H7u3px5Qn1Fc6RMDTh571edCr8=","translations":{}}],"screenshots":[{"url":"https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/displayResult.jpg"},{"url":"https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/admin.jpg"}],"translations":{"en":{"name":"Nextant","summary":"Navigate through your cloud using Solr","description":"\n\t Navigate through your cloud using Solr\n\n\n**Nextant** performs fast and concise _Full-Text Search_ within:\n\n- your own files,\n- shared files,\n- external storage,\n- bookmarks\n\n\n### Recognized file format:\n- plain text,\n- rtf,\n- pdf,\n- html,\n- openoffice,\n- microsoft office,\n- image JPEG and TIFF (will requiert Tesseract installed)\n- pdf with no text layer (will also requiert Tesseract) _[work in progress]_\n\n\n\n## Installation\n\n- [You first need to install a Solr servlet](https://github.com/nextcloud/nextant/wiki)\n- Download the .zip from the appstore, unzip and place this app in **nextcloud/apps/** (or clone the github and build the app yourself)\n- Enable the app in the app list,\n- Edit the settings in the administration page.\n- Extract the current files from your cloud using the **./occ nextant:index** commands\n- Have a look to this [explanation on how Nextant works](https://github.com/nextcloud/nextant/wiki/Extracting,-Live-Update)\n- _(Optional)_ [Installing Tesseract](https://github.com/tesseract-ocr/tesseract/wiki) ([Optical Character Recognition](https://en.wikipedia.org/wiki/Optical_character_recognition) (OCR) Engine) will allow Nextant to extract text from images and pdfs without text layer.\n\n\n\t"}},"isFeatured":false,"authors":[{"name":"Maxence Lange","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIIEAjCCAuoCAhAFMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYwOTE0MTI1NDQwWhcNMjYxMjIxMTI1NDQwWjASMRAwDgYD\nVQQDDAduZXh0YW50MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsbnQ\n+9acjKHfcrUj4yqBpD++GmQ5z2Sp8C8uOz4ZbLyM9bUXEYHo4a4u3CdC49kGUkb3\np5MkEAEzslTWDi1eh5MZgPWpbPgItsDsXY1o55O3jtxNkzSG5/yYcPQcuKtIOm9S\n7DY0K+UQt3nK+RrXEZfARMNrzFbEzpE3b7w901Yl5n+m/B8rhW4pqg8uSfx3u04J\nwduV1fHwoHUB0Ox5HyWib4Pq1XppNh7xdc2Fg93JxshwuCPJyOOzrFTnxC7s1yzQ\nUvaqkjPW5QeQRunQjZ2XtpYH8f8v01W18bNEiHwqtFwuDEyCVx1rvEMgUDVXdPkP\ngZrlB5TzGmz0U3HzYvf6205WuzfHxz7kPj502wP51PoZBKpniggKzmuXkx6BpsZC\nZX45VpDHdiATLwRj1t2bMs3C01nzpIWO5ZwFtkepH3Y+mvwX5lDh/XDsqJC2Yo8o\nWMmniWNW7dspufYOsBUqqYGP7rkailgVT4oYk6D1j6oFZ5SSpfPF5lsyYedDSM6y\nbIGVkSF+sjLK6R9BenBijKceAKsS//WwRYCBPC+JHlsYpXKW12bL+C47Kj2/N6d4\nrYryzV6ofVSF6pwIq0oEjoyfBfNpYavf3xrRkSSmIIlPSnMY7DT1xkGD5retxSm6\n+WIfkWKRZpv2S6PhMHGLspYc4H5Dj8c48rG5Co8CAwEAATANBgkqhkiG9w0BAQsF\nAAOCAQEAOZUwyPaUi+1BOUgQJMWqYRoTVZUyBshTXSC7jSwa97b7qADV9ooA6TYF\nzgsPcE41k7jRkUbnjcY45RGtL3vqsgZbx5TjPa5fGMxlqJ6eYBOY61Q6VIHEVm3u\nxnPEO9dsMoDBijvo5D7KtE+Ccs907Rq70kCsbrdgPHkyb5tDSnCKogN1LiQrg1EP\nmy7Z1C7jG9/h57vx0+QBMDCYnTmqLsvMKqo27uHskzAiB7VXLEdSZ2FtMGHkLUQO\n0bfhnvTZ2VhMmK83t7ovo71An4ycmsolGD/MA0vNI78VrVISrdI8rRh2WntUnCBU\nEJL3BaQAQaASSsvFrcozYxrQG4VzEg==\n-----END CERTIFICATE-----"}] EOD; public static $expectedResponse = [ - 'data' => - [ - 0 => - [ + 'data' + => [ + 0 + => [ 'id' => 'direct_menu', - 'categories' => - [ + 'categories' + => [ 0 => 'customization', ], 'userDocs' => '', @@ -61,27 +62,27 @@ EOD; 'website' => '', 'created' => '2016-10-01T09:16:06.030994Z', 'lastModified' => '2016-10-06T14:01:05.584192Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '0.9.2', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ + 'databases' + => [ ], - 'shellCommands' => - [ + 'shellCommands' + => [ ], 'phpVersionSpec' => '*', 'platformVersionSpec' => '>=9.0.0 <12.0.0', 'minIntSize' => 32, 'download' => 'https://github.com/juliushaertl/direct_menu/releases/download/v0.9.2/direct_menu.tar.gz', 'created' => '2016-10-06T14:01:05.578297Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-10-06T14:01:05.643813Z', @@ -99,32 +100,32 @@ u2SqRhwybS8j4YvfjAL9RPdRfPLwf6X2gx/Y6QFrKHH0QMI/9J/ZFyoUQcqKbsHV bkR1DTBCyDjdpNBidpa3/26675dz5IT5Zedp4BBBREQzX08cIhJx5mgqDdX3CU09 uWtzoaLi71/1BWTFAN+Y9VyfZ8/Z3Pg3vKedRJ565mztIj0geL3riEsC5YnPS0+C +a3B9sDiiOa101EORzX3lrPqL7reEPdCxrIwN+hKFBQ=', - 'translations' => - [ + 'translations' + => [ ], ], ], - 'screenshots' => - [ - 0 => - [ + 'screenshots' + => [ + 0 + => [ 'url' => 'https://bitgrid.net/~jus/direct_menu_nc.png', ], ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'Direct Menu', 'summary' => 'Provide easy access to all apps in the header.', 'description' => 'Provide easy access to all apps in the header.', ], ], 'isFeatured' => false, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'Julius Hรคrtl', 'mail' => '', 'homepage' => '', @@ -159,11 +160,11 @@ G2dF9Gtu4GiQ5fuaJknaxlgXHovfqeZwZJX9o4M+Ug81AqiY7XjdiaCPdh0Tthcx 2OmWZo7UBREWenjKyFZZ/iKoqH5sdenBtpo= -----END CERTIFICATE-----', ], - 1 => - [ + 1 + => [ 'id' => 'apporder', - 'categories' => - [ + 'categories' + => [ 0 => 'customization', ], 'userDocs' => '', @@ -173,27 +174,27 @@ G2dF9Gtu4GiQ5fuaJknaxlgXHovfqeZwZJX9o4M+Ug81AqiY7XjdiaCPdh0Tthcx 'website' => '', 'created' => '2016-10-01T09:16:47.111889Z', 'lastModified' => '2016-10-12T19:50:16.038821Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '0.3.3', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ + 'databases' + => [ ], - 'shellCommands' => - [ + 'shellCommands' + => [ ], 'phpVersionSpec' => '*', 'platformVersionSpec' => '>=9.0.0 <12.0.0', 'minIntSize' => 32, 'download' => 'https://github.com/juliushaertl/apporder/releases/download/0.3.3/apporder.tar.gz', 'created' => '2016-10-12T19:14:10.802359Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-10-12T19:50:16.104357Z', @@ -201,22 +202,22 @@ G2dF9Gtu4GiQ5fuaJknaxlgXHovfqeZwZJX9o4M+Ug81AqiY7XjdiaCPdh0Tthcx 'rawPhpVersionSpec' => '*', 'rawPlatformVersionSpec' => '>=9 <=11', 'signature' => 'nhlT9lhrmBxIsqh/e3RLm2NDw/U8ZvvoMyYQTLMM3H19DQmVcPYPYC9QWVTsowUzXblVaOXVGylbpKma9yOlOAqJtF3qyXecLl4+tA/Awb6BBhKPgHFdcLDAL5yy1K7/uei3SgEojMlJoI9vEK5I1C5YTh43yNH+//Im6MAuNYFUTlMXK426zdOe6ogpCI5GlYdXopqYANxcpT+WXWET6DDSM5Ev+MYwMcSAY4r8+tvARRU4ZAenRgjkBT6R5z6cD76emRax14tbV6vkjjwRcO+dQtM0tFPbd+5fsNInbauv50VzIMgjA6RnKTOI17gRsSdGlsV4vZn2aIxEPWauu6T/UohMvAE9HMn13vtbpPBSFwJAktj6yHASYGzupNQLprA0+OdyALoLZPpQAKNEXA42a4EVISBKu0EmduHJlUPeqhnIGkkGgVNWS8AWqzP2nFoPdXBgUWateiMcBTHxgEKDac5YmNc9lsXpzf1OxBaXHBhGYKuXPwIfyH3jTWb1OdwixJEuRe9dl63T9qOTRre8QWns/bMqKLibGfMtFhVB21ARJayBuX70eVvabG/2N7Y5t1zUlFygIKu51tvo3AVCRDdRrFWDvkAjxzIz5FIdALVZ+DReFYu/r4WF/w3V9rInFuEDSwb/OH4r8sQycs07tSlMyA74Y3FpjKTBxso=', - 'translations' => - [ + 'translations' + => [ ], ], ], - 'screenshots' => - [ - 0 => - [ + 'screenshots' + => [ + 0 + => [ 'url' => 'https://bitgrid.net/~jus/apporder-nc.gif', ], ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'AppOrder', 'summary' => 'Sort apps in the menu with drag and drop', 'description' => ' @@ -242,10 +243,10 @@ first app of the user order. ], ], 'isFeatured' => false, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'Julius Hรคrtl', 'mail' => 'jus@bitgrid.net', 'homepage' => '', @@ -280,11 +281,11 @@ Tu+WGOL2Ee5U4k4XFdzeSLODWby08iU+Gx3bXTR6WIvXCYeIVsCPKK/luvfGkiSR CpW1GUIA1cyulT4uyHf9g6BMdYVOsFQ= -----END CERTIFICATE-----', ], - 2 => - [ + 2 + => [ 'id' => 'twofactor_totp', - 'categories' => - [ + 'categories' + => [ 0 => 'tools', ], 'userDocs' => '', @@ -294,27 +295,27 @@ CpW1GUIA1cyulT4uyHf9g6BMdYVOsFQ= 'website' => '', 'created' => '2016-10-08T14:13:54.356716Z', 'lastModified' => '2016-10-12T14:38:56.186269Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '0.4.1', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ + 'databases' + => [ ], - 'shellCommands' => - [ + 'shellCommands' + => [ ], 'phpVersionSpec' => '>=5.4.0 <7.1.0', 'platformVersionSpec' => '>=10.0.0 <12.0.0', 'minIntSize' => 32, 'download' => 'https://github.com/ChristophWurst/twofactor_totp/releases/download/0.4.1/twofactor_totp.tar.gz', 'created' => '2016-10-12T14:38:56.174612Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-10-12T14:38:56.248223Z', @@ -332,28 +333,28 @@ h7ro5ls+d3OQ8i3i4vdZm821Ytxdu/DQBHiVoOBarvFWwWAv2zd2VAvpTmk6J5yv 3y+csRqpEJYd9fcVMPsTu7WBRRrpBsAqdAHJcZEwak2kz1kdOgSf8FIzP1z6Q71d Ml2RKcPeutMHHSLiGIN/h7fM5aSs49wGgGZmfz28fHVd7/U0HFSMYmkT/GMq5tMP Iyc+QZAN4qbX8G0k/QSTkK/L4lOT2hQiQqiSqmWItMk=', - 'translations' => - [ + 'translations' + => [ ], ], ], - 'screenshots' => - [ + 'screenshots' + => [ ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'Two Factor TOTP Provider', 'summary' => 'A Two-Factor-Auth Provider for TOTP (e.g. Google Authenticator)', 'description' => 'A Two-Factor-Auth Provider for TOTP (e.g. Google Authenticator)', ], ], 'isFeatured' => true, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'Christoph Wurst', 'mail' => '', 'homepage' => '', @@ -388,11 +389,11 @@ VMgQ6yUWNuzOQMZpMIV7RMOUZHvxiX/ZWUFzXNYX0GYub6p4O2uh3LJE+xXyDf77 RBO7PLY3m4TXCeKesxZlkoGke+lnq7B8tkADdPI= -----END CERTIFICATE-----', ], - 3 => - [ + 3 + => [ 'id' => 'contacts', - 'categories' => - [ + 'categories' + => [ 0 => 'office', 1 => 'organization', 2 => 'social', @@ -404,27 +405,27 @@ RBO7PLY3m4TXCeKesxZlkoGke+lnq7B8tkADdPI= 'website' => 'https://github.com/nextcloud/contacts#readme', 'created' => '2016-10-30T14:00:58.922766Z', 'lastModified' => '2016-11-22T22:08:01.904319Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '1.5.0', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ + 'databases' + => [ ], - 'shellCommands' => - [ + 'shellCommands' + => [ ], 'phpVersionSpec' => '*', 'platformVersionSpec' => '>=9.0.0 <12.0.0', 'minIntSize' => 32, 'download' => 'https://github.com/nextcloud/contacts/releases/download/v1.5.0/contacts.tar.gz', 'created' => '2016-11-22T22:08:01.861942Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-11-22T22:08:02.306939Z', @@ -442,44 +443,44 @@ Me1EZcde8SLEpTbCWYIfIw/O9Fkp5cWD/dAqoiO6g+gNxSZ/gGp57qoGfFxn7d/x H3aH8GljatAFjrwItw1JzR0THt0ukkOK+bw/pfCslk10sjHMitmz/GXa4qMS91DZ BKLUd0dSfQUQzkfwcojImbzJRvca4/DYe3mfG7+RCH0tDL6t72dKL9joB++u5R1u VZPgkToexlXcKWpiDB8H2/SEShKr4udAOjR5de9CYWM=', - 'translations' => - [ + 'translations' + => [ ], ], ], - 'screenshots' => - [ - 0 => - [ + 'screenshots' + => [ + 0 + => [ 'url' => 'https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Contacts/contacts.png', ], ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'Contacts', 'summary' => 'The new and improved app for your Contacts.', 'description' => 'The new and improved app for your Contacts.', ], ], 'isFeatured' => true, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'Alexander Weidinger', 'mail' => '', 'homepage' => '', ], - 1 => - [ + 1 + => [ 'name' => 'Jan-Christoph Borchardt', 'mail' => '', 'homepage' => '', ], - 2 => - [ + 2 + => [ 'name' => 'Hendrik Leppelsack', 'mail' => '', 'homepage' => '', @@ -514,11 +515,11 @@ Gld7yCP47xNPaAZEC66odcClvNtJ2Clgp8739jD6uJJCqcKDejeef0VU1PG7AXId 52bVrGMxJwOuL1393vKxGH0PHDzcB1M= -----END CERTIFICATE-----', ], - 4 => - [ + 4 + => [ 'id' => 'mail', - 'categories' => - [ + 'categories' + => [ 0 => 'tools', ], 'userDocs' => '', @@ -528,27 +529,27 @@ Gld7yCP47xNPaAZEC66odcClvNtJ2Clgp8739jD6uJJCqcKDejeef0VU1PG7AXId 'website' => '', 'created' => '2016-10-19T19:41:41.710285Z', 'lastModified' => '2016-10-19T19:57:33.689238Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '0.6.0', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ + 'databases' + => [ ], - 'shellCommands' => - [ + 'shellCommands' + => [ ], 'phpVersionSpec' => '>=5.4.0 <7.1.0', 'platformVersionSpec' => '>=10.0.0 <12.0.0', 'minIntSize' => 32, 'download' => 'https://github.com/nextcloud/mail/releases/download/v0.6.0/mail.tar.gz', 'created' => '2016-10-19T19:57:33.676730Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-10-19T19:57:33.834580Z', @@ -566,10 +567,10 @@ sP8OrkQFooL4E7S4BWfdSiN/a8jUITJQkuXp/OVrVGeCupLWJh7qegUw6DvoqyGy D4c6b+qYn68kx3CLaPPiz+tFAZQZQdj7+Kx/lohso8yTnVSiGYrMj4IvvCbpsQjg WF3WSqF/K/tTnPYTWb9NUPSihTbVNv6AXOfTsPEp/ba2YSS5DjvjVjkr5vhR9eg1 ikQ3Cw6lW3vaA4LVCC+hFkMRnI4N0bo5qQavP3PnZPc=', - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'changelog' => '### Added - Alias support [#1523](https://github.com/owncloud/mail/pull/1523) @tahaalibra @@ -607,23 +608,23 @@ ikQ3Cw6lW3vaA4LVCC+hFkMRnI4N0bo5qQavP3PnZPc=', ], ], ], - 'screenshots' => - [ + 'screenshots' + => [ ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'Mail', 'summary' => 'Easy to use email client which connects to your mail server via IMAP and SMTP.', 'description' => 'Easy to use email client which connects to your mail server via IMAP and SMTP.', ], ], 'isFeatured' => false, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'Christoph Wurst, Thomas Mรผller, Jan-Christoph Borchardt, Steffen Lindner & many more โฆ', 'mail' => '', 'homepage' => '', @@ -658,11 +659,11 @@ xRS4JXbapjolkxyGSpP+iYSgItVnYzl6o9KZResR4yDsBv7G/8fpV4GQU9IS3zLD PiZOosVHWJdpUKCw9V4P1prGTQ== -----END CERTIFICATE-----', ], - 5 => - [ + 5 + => [ 'id' => 'audioplayer', - 'categories' => - [ + 'categories' + => [ 0 => 'multimedia', ], 'userDocs' => 'https://github.com/rello/audioplayer/wiki#user-documentation', @@ -672,27 +673,27 @@ PiZOosVHWJdpUKCw9V4P1prGTQ== 'website' => 'https://github.com/rello/audioplayer', 'created' => '2016-09-16T05:44:24.857567Z', 'lastModified' => '2016-11-17T22:34:34.637028Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '1.3.1', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ + 'databases' + => [ ], - 'shellCommands' => - [ + 'shellCommands' + => [ ], 'phpVersionSpec' => '>=5.4.0', 'platformVersionSpec' => '>=9.0.0 <12.0.0', 'minIntSize' => 32, 'download' => 'https://github.com/Rello/audioplayer/releases/download/1.3.1/audioplayer-1.3.1.tar.gz', 'created' => '2016-11-17T22:34:34.215350Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-11-17T22:34:34.867778Z', @@ -700,10 +701,10 @@ PiZOosVHWJdpUKCw9V4P1prGTQ== 'rawPhpVersionSpec' => '>=5.4', 'rawPlatformVersionSpec' => '>=9 <=11', 'signature' => 'p6Zz0IEFrxvw6y/3jHgGWWCxR6qpMzvU2HKfxcIVsK6sJnoRUhWLeAXwZ432fH2a S2llj+IGS9OvW+5VQElrXgPtEjDK1BT00DRJnp5RFCRlUv0LNoedJMzx6B6AHqPP JBufk3cG1O/CO0M0L1ITGSmSOzfKvWTRo3lxVGF792NyBaP/SyZCkH1N1TzBQzUi Ywl3+HiglPcXbHjtJm/arnKorbJWVKoaN93xFuaBapd2ozQSpi0fE0uGRsici+U7 HNa1M5WFE1rzUJoufE0E9246At07rFY1e+TdNEq8IlLgCXg5vGCKkEyuWpWno6aX LfRaIiT9x39UTAwNvuDKS0c+n4uWDYPsGfKhDx9N7CXpUrthfXVEWRzZEXG7as10 6ANvrRPJemSZH8FUSrdJhD7k12qa9R825y7mIG68Li8P71V92EOxFfo9tNXqXwBt VuDGxBqByFVPqSCj5I8hrzJzQl2Xt40g8+8ZcSF96RMg/pM+bwRMTv+mz0V+vQQ4 DWjqnWVPalaJ1PPD5/QFFErtXuNRbyxKZ6BMWxfJlLM9Kz66P75K+8fYaSwz+2KG NxY7I3svzS2K9LGH3fBLUy1t3Hl+c3zGFq/ll1MJrf9NswV4yxt2WmISfM/KDww8 yELkGs2cRzbw2tCvnmYlJJhIqRLkyFAbDzWRH/XdVx4=', - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'changelog' => '2016-11-17 - fix: one-click-play for wav not working - fix: wrong sql statement for PostgreSQL [#90](https://github.com/rello/audioplayer/issues/90)', @@ -711,35 +712,35 @@ PiZOosVHWJdpUKCw9V4P1prGTQ== ], ], ], - 'screenshots' => - [ - 0 => - [ + 'screenshots' + => [ + 0 + => [ 'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_main.png', ], - 1 => - [ + 1 + => [ 'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_lists.png', ], - 2 => - [ + 2 + => [ 'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_share.png', ], ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'Audio Player', 'summary' => 'Audio Player for ownCloud and Nextcloud', 'description' => 'Audio Player for MP3, MP4, Ogg, and Wave with a lot of flexibility for all your needs.', ], ], 'isFeatured' => false, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'Marcel Scherello', 'mail' => '', 'homepage' => '', @@ -774,11 +775,11 @@ FNvGFVBn4r5qCiChEoq+rCXHRjPi/eCfbW21XeLFDiLxapcZyc85JIcA7znUYoFe P7Y/ekMscwWhLbF91OaQlcWpRtEMyde/DaI= -----END CERTIFICATE-----', ], - 6 => - [ + 6 + => [ 'id' => 'calendar', - 'categories' => - [ + 'categories' + => [ 0 => 'organization', ], 'userDocs' => 'https://docs.nextcloud.com/server/10/user_manual/pim/calendar.html', @@ -788,27 +789,27 @@ P7Y/ekMscwWhLbF91OaQlcWpRtEMyde/DaI= 'website' => 'https://github.com/nextcloud/calendar/', 'created' => '2016-10-01T12:40:39.060903Z', 'lastModified' => '2016-11-22T20:31:13.029921Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '1.4.1', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ + 'databases' + => [ ], - 'shellCommands' => - [ + 'shellCommands' + => [ ], 'phpVersionSpec' => '*', 'platformVersionSpec' => '>=9.0.0 <12.0.0', 'minIntSize' => 32, 'download' => 'https://github.com/nextcloud/calendar/releases/download/v1.4.1/calendar.tar.gz', 'created' => '2016-11-22T20:31:13.020268Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-11-22T20:31:13.087340Z', @@ -826,34 +827,34 @@ hh1FBfA5pvCJbkJ6nr5bU4bKaffwDX1nr5h77FS5zzn0Pyd7ZIExmVmNtaeJfnfV eFLKrUg3EvnTjvknbBxMB55h9jNJr0SAlkrmyEVm6+CE3BwRWpKB+cJMBuGiwPwv r/ASRiJrkDThbNWAUtX70rUmCqDV6/MujLXViqOc/Q2OHvcXd1oGDccJSQT92/1z 7nonnedyYQIDqUt7u68WL8JRxp7pFsEqKLVuWSgxW3c=', - 'translations' => - [ + 'translations' + => [ ], ], ], - 'screenshots' => - [ - 0 => - [ + 'screenshots' + => [ + 0 + => [ 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/1.png', ], - 1 => - [ + 1 + => [ 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/2.png', ], - 2 => - [ + 2 + => [ 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/3.png', ], - 3 => - [ + 3 + => [ 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/4.png', ], ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'Calendar', 'summary' => 'Calendar GUI for Nextcloud\'s CalDAV server', 'description' => 'The Nextcloud calendar app is a user interface for Nextcloud\'s CalDAV server. @@ -862,22 +863,22 @@ It integrates with other apps, allows you to manage calendars and events, displa ], ], 'isFeatured' => true, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'Georg Ehrke', 'mail' => '', 'homepage' => 'https://georg.coffee', ], - 1 => - [ + 1 + => [ 'name' => 'Raghu Nayyar', 'mail' => '', 'homepage' => 'http://raghunayyar.com', ], - 2 => - [ + 2 + => [ 'name' => 'Thomas Citharel', 'mail' => '', 'homepage' => 'https://tcit.fr', @@ -912,11 +913,11 @@ Q0Bl/QinETk72afGR46Qvc7tC1t9JjQQD3AUbEGuJdGvXjJJ9GREYu01XoODmPdT jXXOI8XIOK6kxXhPHUc3iWu9b4KqGm0= -----END CERTIFICATE-----', ], - 8 => - [ + 8 + => [ 'id' => 'ownpad', - 'categories' => - [ + 'categories' + => [ 0 => 'tools', ], 'userDocs' => 'https://github.com/otetard/ownpad/blob/master/README.md#mimetype-detection', @@ -926,27 +927,27 @@ jXXOI8XIOK6kxXhPHUc3iWu9b4KqGm0= 'website' => '', 'created' => '2016-09-29T15:58:52.814912Z', 'lastModified' => '2016-11-19T17:37:52.278497Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '0.5.6', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ + 'databases' + => [ ], - 'shellCommands' => - [ + 'shellCommands' + => [ ], 'phpVersionSpec' => '*', 'platformVersionSpec' => '>=9.0.0 <12.0.0', 'minIntSize' => 32, 'download' => 'https://github.com/otetard/ownpad/releases/download/v0.5.6/ownpad.tar.gz', 'created' => '2016-11-19T17:37:52.234684Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-11-19T17:37:52.423930Z', @@ -964,18 +965,18 @@ qEC5WBgJucsFxSvkHh52v43M8jgPYBfHWEL/M/+377z3+mbuIh+BcQ+vcDdiqxTF o3n0+gw3QYIhLEe75sUhxG6ynVUdW25AKKju1kVj3KJnZTBH1R8t8/zy4DnJG8d4 uRGqyU4BXpZjEC3nVlsC7vCncWWhxl0WZQ/MWKqsfjVAU4I88E518D6NioqMnPEJ iCZ2x+69UCDEQyfCSKajgAYT17r3OhZei8F9KSCH8Vw=', - 'translations' => - [ + 'translations' + => [ ], ], ], - 'screenshots' => - [ + 'screenshots' + => [ ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'Ownpad', 'summary' => ' Create and open Etherpad and Ethercalc documents. @@ -990,10 +991,10 @@ iCZ2x+69UCDEQyfCSKajgAYT17r3OhZei8F9KSCH8Vw=', ], ], 'isFeatured' => false, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'Olivier Tรฉtard', 'mail' => 'olivier.tetard@miskin.fr', 'homepage' => '', @@ -1028,11 +1029,11 @@ EUa2uYht/z475k4+vf0YhV98iQH07GnmlfD2TDZgmOCQGKlNfJh1v88OZyLLa3dz gRHzGwKbAiJ8T8bbpZ3e2ozXxADr -----END CERTIFICATE-----', ], - 9 => - [ + 9 + => [ 'id' => 'announcementcenter', - 'categories' => - [ + 'categories' + => [ 0 => 'organization', ], 'userDocs' => '', @@ -1042,27 +1043,27 @@ gRHzGwKbAiJ8T8bbpZ3e2ozXxADr 'website' => 'https://github.com/nextcloud/announcementcenter', 'created' => '2016-09-14T10:38:53.939634Z', 'lastModified' => '2016-11-24T11:21:50.324839Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '2.0.0', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ + 'databases' + => [ ], - 'shellCommands' => - [ + 'shellCommands' + => [ ], 'phpVersionSpec' => '*', 'platformVersionSpec' => '>=10.0.0 <12.0.0', 'minIntSize' => 32, 'download' => 'https://github.com/nextcloud/announcementcenter/releases/download/v2.0.0/announcementcenter-2.0.0.tar.gz', 'created' => '2016-10-06T12:41:56.195206Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-10-06T12:41:56.263124Z', @@ -1075,32 +1076,32 @@ iWUb/Uv/ODj74wVDWqWxAFKaAG/FestCB3InOOZQqQZLzlAV0U9ziYDGNzBjFqof 9rLNxJ2IOqZOA7hhMIKhSrpA0KkSfNhBsVf8CWClYnVkZQiq0LoYkHkHIlXmXUr3 OfQFKEjtsx+bNLa6CkAaocHGHJXAofX3GQZ9cjBsjZqiTfbXfcVk0kRfz7pwL92L I1McfJYvgMxDQG5bjRpNJw==', - 'translations' => - [ + 'translations' + => [ ], ], ], - 'screenshots' => - [ - 0 => - [ + 'screenshots' + => [ + 0 + => [ 'url' => 'https://github.com/nextcloud/announcementcenter/raw/stable10/docs/AnnouncementCenterFrontpage.png', ], ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'Announcement Center', 'summary' => 'An announcement center for Nextcloud', 'description' => 'An announcement center for Nextcloud', ], ], 'isFeatured' => true, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'Joas Schilling', 'mail' => '', 'homepage' => '', @@ -1130,11 +1131,11 @@ JJoU8LQoHwGRtp3wutk0GlFzpEQEvSsn/Lsvvot5IfIe46tnzA6MVj5s64s5G8+Q phhXFlzXqO/VxquPdbfYjvU= -----END CERTIFICATE-----', ], - 11 => - [ + 11 + => [ 'id' => 'rainloop', - 'categories' => - [ + 'categories' + => [ 0 => 'social', 1 => 'tools', ], @@ -1145,27 +1146,27 @@ phhXFlzXqO/VxquPdbfYjvU= 'website' => 'http://www.rainloop.net/', 'created' => '2016-10-20T04:17:37.217555Z', 'lastModified' => '2016-11-18T11:36:04.309739Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '4.26.0', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ + 'databases' + => [ ], - 'shellCommands' => - [ + 'shellCommands' + => [ ], 'phpVersionSpec' => '>=5.4.0', 'platformVersionSpec' => '>=10.0.0 <12.0.0', 'minIntSize' => 32, 'download' => 'https://github.com/pierre-alain-b/rainloop-nextcloud/releases/download/v4.26.0/rainloop-4.26.0.tar.gz', 'created' => '2016-10-20T04:28:21.491747Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-11-18T11:36:04.619927Z', @@ -1183,32 +1184,32 @@ hgFhPrg+7rf7g6UmJFOCp0dC9sBdyQ3KtJkv7bGqPr854r2cdA7xW0QHWQ2in9qQ LhIczc32ECi3ZVVgyF8zyT4Y/3MRS05oX3FHvHyt88mjni6bVaO78F7ZRSha8gHh NOAkku7AMXPvUCHaZP2iVCCoAViEso8GeR3O8xh2G42Ai61RLYwx8LB1+23EoJTr mfFuRYNSg+qAKCokXNnh+lDlwu4AkaQo3vtKGPXvU7A=', - 'translations' => - [ + 'translations' + => [ ], ], ], - 'screenshots' => - [ - 0 => - [ + 'screenshots' + => [ + 0 + => [ 'url' => 'https://raw.githubusercontent.com/pierre-alain-b/rainloop-nextcloud/master/screenshots/2016.10.20-screenshot.jpg', ], ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'RainLoop', 'summary' => 'RainLoop Webmail', 'description' => 'Simple, modern and fast web-based email client.', ], ], 'isFeatured' => false, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'RainLoop Team', 'mail' => '', 'homepage' => '', @@ -1243,11 +1244,11 @@ iLYeXQTV0XSRs8xVt+iyGlj7nPkv2DR0oCqRpWUFWeSBI//niDG5WxS3qg8kacSW fDSYhSN+IjrnIkwNtc8V9t7/GeQB5FE= -----END CERTIFICATE-----', ], - 12 => - [ + 12 + => [ 'id' => 'richdocuments', - 'categories' => - [ + 'categories' + => [ 0 => 'integration', 1 => 'office', ], @@ -1258,27 +1259,27 @@ fDSYhSN+IjrnIkwNtc8V9t7/GeQB5FE= 'website' => '', 'created' => '2016-10-31T08:55:45.631429Z', 'lastModified' => '2016-11-24T12:13:53.905352Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '1.1.14', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ + 'databases' + => [ ], - 'shellCommands' => - [ + 'shellCommands' + => [ ], 'phpVersionSpec' => '*', 'platformVersionSpec' => '>=9.0.0 <12.0.0', 'minIntSize' => 32, 'download' => 'https://github.com/owncloud/richdocuments/releases/download/1.1.14/richdocuments.tar.gz', 'created' => '2016-11-24T12:10:13.337165Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-11-24T12:13:53.963638Z', @@ -1291,44 +1292,44 @@ vKu5eNcOkf+WFyFKYi51TbsfWn2+1Wge3WWujKAVcEvqtcOOz+uMWNtqzBptEupk E1aaRnQfTx488YB8Ubul06LIY0PNCHgGCWPgy817tOVT7JA+V0P0FFonl/PXE0dr WgtxRJmvGaNiFzYq+kQmdKMfayZTm3kdVgP0W52t5wp878K0i4s2KPg5lANvjTz7 DCT+VV2IGIE52o4RpMUGyQ==', - 'translations' => - [ + 'translations' + => [ ], ], ], - 'screenshots' => - [ - 0 => - [ + 'screenshots' + => [ + 0 + => [ 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-document.png', ], - 1 => - [ + 1 + => [ 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-app.png', ], - 2 => - [ + 2 + => [ 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-presentation.png', ], - 3 => - [ + 3 + => [ 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-spreadsheet.png', ], ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'Collabora Online', 'summary' => 'Edit office documents directly in your browser.', 'description' => 'Collabora Online allows you to to work with all kinds of office documents directly in your browser. This application requires Collabora Cloudsuite to be installed on one of your servers, please read the documentation to learn more about that.', ], ], 'isFeatured' => false, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'Collabora Productivity based on work of Frank Karlitschek, Victor Dubiniuk', 'mail' => '', 'homepage' => '', @@ -1358,11 +1359,11 @@ myBOrjhrJgLIwvgH26MYZhdiSkFzoE38nMPZdrUmUDxcPCwucWJqgzDPudguFthj WCVZ3TTG/2z3+tWM -----END CERTIFICATE-----', ], - 13 => - [ + 13 + => [ 'id' => 'ocr', - 'categories' => - [ + 'categories' + => [ 0 => 'files', 1 => 'tools', ], @@ -1373,37 +1374,37 @@ WCVZ3TTG/2z3+tWM 'website' => 'https://janis91.github.io/ocr/', 'created' => '2016-09-19T12:07:49.220376Z', 'lastModified' => '2016-11-21T11:22:21.024501Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '1.0.0', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ - 0 => - [ + 'databases' + => [ + 0 + => [ 'id' => 'pgsql', 'versionSpec' => '*', 'rawVersionSpec' => '*', ], - 1 => - [ + 1 + => [ 'id' => 'mysql', 'versionSpec' => '*', 'rawVersionSpec' => '*', ], - 2 => - [ + 2 + => [ 'id' => 'sqlite', 'versionSpec' => '*', 'rawVersionSpec' => '*', ], ], - 'shellCommands' => - [ + 'shellCommands' + => [ 0 => 'ocrmypdf', 1 => 'tesseract', ], @@ -1412,8 +1413,8 @@ WCVZ3TTG/2z3+tWM 'minIntSize' => 32, 'download' => 'https://github.com/janis91/ocr/releases/download/v1.0.0/ocr.tar.gz', 'created' => '2016-10-24T06:50:43.283900Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-11-21T11:22:21.269108Z', @@ -1431,30 +1432,30 @@ GsrecNftUEhP/ngxA6lMBVkLmmdpiexVisvsavPi64i34OUA6qOuxjgNVBDwg56i D3tJOF7spnK6I3BhVLviou/zs30AIRVBDTU0Orzx78cbInwy6/vyJib2a1olAaHz v05SzlQRnBWM4jYBe0mA/2ds9AO6VrXGrT/iLlHemj6JYoGBM185TGewA7OJyX3a HSlSDqaremmi+aS3onx3AKhXykDxTRkMVarePwTzzFs=', - 'translations' => - [ + 'translations' + => [ ], ], ], - 'screenshots' => - [ - 0 => - [ + 'screenshots' + => [ + 0 + => [ 'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc1.png', ], - 1 => - [ + 1 + => [ 'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc2.png', ], - 2 => - [ + 2 + => [ 'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc3.png', ], ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'OCR', 'summary' => 'Character recoginition for your images and pdf files.', 'description' => '# Description @@ -1476,8 +1477,8 @@ The OCR app has some prerequisites: For further information see the homepage or the appropriate documentation.', ], - 'de' => - [ + 'de' + => [ 'name' => 'OCR', 'summary' => 'Schrifterkennung fรผr Bilder (mit Text) und PDF Dateien.', 'description' => '# Beschreibung @@ -1501,10 +1502,10 @@ Fรผr weiter Informationen besuchen Sie die Homepage oder lesen Sie die zutreffen ], ], 'isFeatured' => false, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'Janis Koehr', 'mail' => '', 'homepage' => '', @@ -1539,11 +1540,11 @@ yA1z/MCBEyTRo80jxFmL+MpwbsdbUJi7Qxlnd56zb6HHDGrLHXZTh9LXgyVbnhWL kxomWjIXQh4aMHQL4QF7U4EK -----END CERTIFICATE-----', ], - 14 => - [ + 14 + => [ 'id' => 'spreedme', - 'categories' => - [ + 'categories' + => [ 0 => 'tools', ], 'userDocs' => 'https://github.com/strukturag/nextcloud-spreedme/blob/master/README.md', @@ -1553,27 +1554,27 @@ kxomWjIXQh4aMHQL4QF7U4EK 'website' => '', 'created' => '2016-09-27T08:43:07.835196Z', 'lastModified' => '2016-11-21T16:51:23.703819Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '0.3.4', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ + 'databases' + => [ ], - 'shellCommands' => - [ + 'shellCommands' + => [ ], 'phpVersionSpec' => '*', 'platformVersionSpec' => '>=9.0.0 <12.0.0', 'minIntSize' => 32, 'download' => 'https://apps.owncloud.com/CONTENT/content-files/174436-spreedme.tar.gz', 'created' => '2016-11-21T16:51:23.689599Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-11-21T16:51:23.826509Z', @@ -1591,44 +1592,44 @@ bOks45K5gE1da4QpkYOUQa3GVMNPqPiT3CqjmJ8tjxq7bGpb6v+YoCLACjjPpPZL 2Y28qLxwHVaINDFUUxD75WWdrlulRbqHwiSw8jolP9qrpXhDuLAqYam9tRwV5K5R 8uNawnFwWkicBEYkN/WtBTouWzehOPn38tHXov6SyEyD6lkuxUBZrsGQ2ru+t33U k0kKCbV0GFw43I+3Ji5DiB4TUVNZYVoPG1B7Qve+UfA=', - 'translations' => - [ + 'translations' + => [ ], ], ], - 'screenshots' => - [ - 0 => - [ + 'screenshots' + => [ + 0 + => [ 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/conference.gif', ], - 1 => - [ + 1 + => [ 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/presentation.png', ], - 2 => - [ + 2 + => [ 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/import.png', ], - 3 => - [ + 3 + => [ 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/users.png', ], ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'Spreed.ME', 'summary' => 'Audio-, video- and text chat for your Nextcloud', 'description' => 'Securely communicate with your friends and family using rich audio-, video- and text chat, and much more right from your Nextcloud โ in your browser', ], ], 'isFeatured' => false, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'struktur AG', 'mail' => '', 'homepage' => '', @@ -1663,11 +1664,11 @@ sUNUEU2Decyp0jxLVnrrpz6Y5UupfBR0V8yAv1t5Od/mCKLc5DxHsDWiKOpsob9U JN+bdzJil2NNftihD4Dm7Ha7OS3O8W0= -----END CERTIFICATE-----', ], - 15 => - [ + 15 + => [ 'id' => 'nextant', - 'categories' => - [ + 'categories' + => [ 0 => 'files', 1 => 'tools', ], @@ -1678,27 +1679,27 @@ JN+bdzJil2NNftihD4Dm7Ha7OS3O8W0= 'website' => 'https://github.com/nextcloud/nextant/wiki', 'created' => '2016-09-14T14:34:35.977699Z', 'lastModified' => '2016-11-22T16:02:57.758477Z', - 'releases' => - [ - 0 => - [ + 'releases' + => [ + 0 + => [ 'version' => '0.6.6', - 'phpExtensions' => - [ + 'phpExtensions' + => [ ], - 'databases' => - [ + 'databases' + => [ ], - 'shellCommands' => - [ + 'shellCommands' + => [ ], 'phpVersionSpec' => '*', 'platformVersionSpec' => '>=9.0.0 <12.0.0', 'minIntSize' => 32, 'download' => 'https://github.com/nextcloud/nextant/releases/download/v0.6.6/nextant-0.6.6.tar.gz', 'created' => '2016-11-16T15:11:14.344704Z', - 'licenses' => - [ + 'licenses' + => [ 0 => 'agpl', ], 'lastModified' => '2016-11-16T20:39:59.030384Z', @@ -1716,26 +1717,26 @@ oAKv2GkvWPQ0aiiBtA1i4oXuzvHW/M2wOrK7v7DCpNfILrD/sjxpljxcX082nRCd 9P3iPd2hQ6yOM9fG21LVN74b6wggI81BzFf/xJPd4ZqYLjfeG/yqd0zaiMOzMm1W se+kc/a4iB3BoCNX3E942pBBzew4ya8LkCXdCHUUsuelDf1va1ikTh/G7D84ll9/ 2avNqQnUh3hgOnxFCLI/5VrbqxfSTVdO6O/LTuAmwgw=', - 'translations' => - [ + 'translations' + => [ ], ], ], - 'screenshots' => - [ - 0 => - [ + 'screenshots' + => [ + 0 + => [ 'url' => 'https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/displayResult.jpg', ], - 1 => - [ + 1 + => [ 'url' => 'https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/admin.jpg', ], ], - 'translations' => - [ - 'en' => - [ + 'translations' + => [ + 'en' + => [ 'name' => 'Nextant', 'summary' => 'Navigate through your cloud using Solr', 'description' => ' @@ -1777,10 +1778,10 @@ se+kc/a4iB3BoCNX3E942pBBzew4ya8LkCXdCHUUsuelDf1va1ikTh/G7D84ll9/ ], ], 'isFeatured' => false, - 'authors' => - [ - 0 => - [ + 'authors' + => [ + 0 + => [ 'name' => 'Maxence Lange', 'mail' => '', 'homepage' => '', diff --git a/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php b/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php index 0beb68bf03a..a703a037653 100644 --- a/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/App/AppStore/Fetcher/FetcherBase.php b/tests/lib/App/AppStore/Fetcher/FetcherBase.php index 95129b3114d..a5a9cc73974 100644 --- a/tests/lib/App/AppStore/Fetcher/FetcherBase.php +++ b/tests/lib/App/AppStore/Fetcher/FetcherBase.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/App/AppStore/Version/VersionParserTest.php b/tests/lib/App/AppStore/Version/VersionParserTest.php index c4dd78af496..3ccc68bc076 100644 --- a/tests/lib/App/AppStore/Version/VersionParserTest.php +++ b/tests/lib/App/AppStore/Version/VersionParserTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -56,11 +57,11 @@ class VersionParserTest extends TestCase { } /** - * @dataProvider versionProvider * * @param string $input * @param Version $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('versionProvider')] public function testGetVersion($input, Version $expected): void { $this->assertEquals($expected, $this->versionParser->getVersion($input)); diff --git a/tests/lib/App/AppStore/Version/VersionTest.php b/tests/lib/App/AppStore/Version/VersionTest.php index 7fece37cf5f..83be2be69dd 100644 --- a/tests/lib/App/AppStore/Version/VersionTest.php +++ b/tests/lib/App/AppStore/Version/VersionTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/App/CompareVersionTest.php b/tests/lib/App/CompareVersionTest.php index f357e47d670..3c8295f0ed7 100644 --- a/tests/lib/App/CompareVersionTest.php +++ b/tests/lib/App/CompareVersionTest.php @@ -54,9 +54,7 @@ class CompareVersionTest extends TestCase { ]; } - /** - * @dataProvider comparisonData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('comparisonData')] public function testComparison(string $actualVersion, string $requiredVersion, string $comparator, bool $expected): void { $isCompatible = $this->compare->isCompatible($actualVersion, $requiredVersion, diff --git a/tests/lib/App/DependencyAnalyzerTest.php b/tests/lib/App/DependencyAnalyzerTest.php index d3874b5bb60..db53d678881 100644 --- a/tests/lib/App/DependencyAnalyzerTest.php +++ b/tests/lib/App/DependencyAnalyzerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2023 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc. @@ -67,13 +68,13 @@ class DependencyAnalyzerTest extends TestCase { } /** - * @dataProvider providesPhpVersion * * @param string $expectedMissing * @param string $minVersion * @param string $maxVersion * @param string $intSize */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesPhpVersion')] public function testPhpVersion($expectedMissing, $minVersion, $maxVersion, $intSize): void { $app = [ 'dependencies' => [ @@ -96,10 +97,10 @@ class DependencyAnalyzerTest extends TestCase { } /** - * @dataProvider providesDatabases * @param $expectedMissing * @param $databases */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesDatabases')] public function testDatabases($expectedMissing, $databases): void { $app = [ 'dependencies' => [ @@ -115,11 +116,11 @@ class DependencyAnalyzerTest extends TestCase { } /** - * @dataProvider providesCommands * * @param string $expectedMissing * @param string|null $commands */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesCommands')] public function testCommand($expectedMissing, $commands): void { $app = [ 'dependencies' => [ @@ -135,10 +136,10 @@ class DependencyAnalyzerTest extends TestCase { } /** - * @dataProvider providesLibs * @param $expectedMissing * @param $libs */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesLibs')] public function testLibs($expectedMissing, $libs): void { $app = [ 'dependencies' => [ @@ -155,10 +156,10 @@ class DependencyAnalyzerTest extends TestCase { } /** - * @dataProvider providesOS * @param $expectedMissing * @param $oss */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesOS')] public function testOS($expectedMissing, $oss): void { $app = [ 'dependencies' => [] @@ -174,10 +175,10 @@ class DependencyAnalyzerTest extends TestCase { } /** - * @dataProvider providesOC * @param $expectedMissing * @param $oc */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesOC')] public function testOC($expectedMissing, $oc): void { $app = [ 'dependencies' => [] diff --git a/tests/lib/App/InfoParserTest.php b/tests/lib/App/InfoParserTest.php index 3611a562a74..f7c6a2eb7bd 100644 --- a/tests/lib/App/InfoParserTest.php +++ b/tests/lib/App/InfoParserTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2023 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc. @@ -12,7 +13,7 @@ use OCP\Cache\CappedMemoryCache; use Test\TestCase; class InfoParserTest extends TestCase { - /** @var OCP\Cache\CappedMemoryCache */ + /** @var CappedMemoryCache */ private static $cache; public static function setUpBeforeClass(): void { @@ -31,16 +32,12 @@ class InfoParserTest extends TestCase { $this->assertEquals($expectedData, $data); } - /** - * @dataProvider providesInfoXml - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesInfoXml')] public function testParsingValidXmlWithoutCache($expectedJson, $xmlFile): void { $this->parserTest($expectedJson, $xmlFile); } - /** - * @dataProvider providesInfoXml - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesInfoXml')] public function testParsingValidXmlWithCache($expectedJson, $xmlFile): void { $this->parserTest($expectedJson, $xmlFile, self::$cache); } diff --git a/tests/lib/App/PlatformRepositoryTest.php b/tests/lib/App/PlatformRepositoryTest.php index 01d49d84832..bc0ecb97c5a 100644 --- a/tests/lib/App/PlatformRepositoryTest.php +++ b/tests/lib/App/PlatformRepositoryTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2020-2023 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc. @@ -10,10 +11,10 @@ use OC\App\PlatformRepository; class PlatformRepositoryTest extends \Test\TestCase { /** - * @dataProvider providesVersions * @param $expected * @param $input */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesVersions')] public function testVersion($input, $expected): void { $pr = new PlatformRepository(); $normalizedVersion = $pr->normalizeVersion($input); diff --git a/tests/lib/AppConfigTest.php b/tests/lib/AppConfigTest.php index b7878c42c83..408e4321d4f 100644 --- a/tests/lib/AppConfigTest.php +++ b/tests/lib/AppConfigTest.php @@ -36,8 +36,8 @@ class AppConfigTest extends TestCase { * @var array<string, array<string, array<string, string, int, bool, bool>>> * [appId => [configKey, configValue, valueType, lazy, sensitive]] */ - private static array $baseStruct = - [ + private static array $baseStruct + = [ 'testapp' => [ 'enabled' => ['enabled', 'yes'], 'installed_version' => ['installed_version', '1.2.3'], @@ -268,11 +268,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetAppKeys * * @param string $appId * @param array $expectedKeys */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAppKeys')] public function testGetKeys(string $appId, array $expectedKeys): void { $config = $this->generateAppConfig(); $this->assertEqualsCanonicalizing($expectedKeys, $config->getKeys($appId)); @@ -284,13 +284,13 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetKeys * * @param string $appId * @param string $configKey * @param string $value * @param bool $lazy */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetKeys')] public function testHasKey(string $appId, string $configKey, string $value, int $type, bool $lazy): void { $config = $this->generateAppConfig(); $this->assertEquals(true, $config->hasKey($appId, $configKey, $lazy)); @@ -321,9 +321,7 @@ class AppConfigTest extends TestCase { $this->assertSame(true, $config->hasKey('non-sensitive-app', 'lazy-key', null)); } - /** - * @dataProvider providerGetKeys - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetKeys')] public function testIsSensitive( string $appId, string $configKey, string $configValue, int $type, bool $lazy, bool $sensitive, ): void { @@ -365,9 +363,7 @@ class AppConfigTest extends TestCase { $config->isSensitive('non-sensitive-app', 'lazy-key', false); } - /** - * @dataProvider providerGetKeys - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetKeys')] public function testIsLazy(string $appId, string $configKey, string $configValue, int $type, bool $lazy, ): void { $config = $this->generateAppConfig(); @@ -408,11 +404,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetAppKeys * * @param string $appId * @param array $keys */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAppKeys')] public function testGetAllValuesWithEmptyKey(string $appId, array $keys): void { $config = $this->generateAppConfig(); $this->assertEqualsCanonicalizing($keys, array_keys($config->getAllValues($appId, ''))); @@ -558,23 +554,23 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetValueMixed * * @param string $key * @param string $value */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueMixed')] public function testGetValueMixed(string $key, string $value): void { $config = $this->generateAppConfig(); $this->assertSame($value, $config->getValueMixed('typed', $key)); } /** - * @dataProvider providerGetValueMixed * * @param string $key * @param string $value * @param int $type */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueMixed')] public function testGetValueType(string $key, string $value, int $type): void { $config = $this->generateAppConfig(); $this->assertSame($type, $config->getValueType('typed', $key)); diff --git a/tests/lib/AppFramework/AppTest.php b/tests/lib/AppFramework/AppTest.php index b44ddd6082b..c43cd8e3c54 100644 --- a/tests/lib/AppFramework/AppTest.php +++ b/tests/lib/AppFramework/AppTest.php @@ -63,11 +63,11 @@ class AppTest extends \Test\TestCase { $infoXmlPath = $this->appPath . '/appinfo/info.xml'; mkdir($this->appPath . '/appinfo', 0777, true); - $xml = '<?xml version="1.0" encoding="UTF-8"?>' . - '<info>' . - '<id>namespacetestapp</id>' . - '<namespace>NameSpaceTestApp</namespace>' . - '</info>'; + $xml = '<?xml version="1.0" encoding="UTF-8"?>' + . '<info>' + . '<id>namespacetestapp</id>' + . '<namespace>NameSpaceTestApp</namespace>' + . '</info>'; file_put_contents($infoXmlPath, $xml); } @@ -132,9 +132,7 @@ class AppTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataNoOutput - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoOutput')] public function testNoOutput(string $statusCode): void { $return = [$statusCode, [], [], $this->output, new Response()]; $this->dispatcher->expects($this->once()) diff --git a/tests/lib/AppFramework/Bootstrap/RegistrationContextTest.php b/tests/lib/AppFramework/Bootstrap/RegistrationContextTest.php index 6469a01cce3..c0095713370 100644 --- a/tests/lib/AppFramework/Bootstrap/RegistrationContextTest.php +++ b/tests/lib/AppFramework/Bootstrap/RegistrationContextTest.php @@ -68,9 +68,7 @@ class RegistrationContextTest extends TestCase { $this->context->delegateEventListenerRegistrations($dispatcher); } - /** - * @dataProvider dataProvider_TrueFalse - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider_TrueFalse')] public function testRegisterService(bool $shared): void { $app = $this->createMock(App::class); $service = 'abc'; diff --git a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php index bcc0daf002f..4efcac2dccf 100644 --- a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php +++ b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/AppFramework/Controller/OCSControllerTest.php b/tests/lib/AppFramework/Controller/OCSControllerTest.php index 027881074c9..4ab45ad6b06 100644 --- a/tests/lib/AppFramework/Controller/OCSControllerTest.php +++ b/tests/lib/AppFramework/Controller/OCSControllerTest.php @@ -53,19 +53,19 @@ class OCSControllerTest extends \Test\TestCase { )); $controller->setOCSVersion(1); - $expected = "<?xml version=\"1.0\"?>\n" . - "<ocs>\n" . - " <meta>\n" . - " <status>ok</status>\n" . - " <statuscode>100</statuscode>\n" . - " <message>OK</message>\n" . - " <totalitems></totalitems>\n" . - " <itemsperpage></itemsperpage>\n" . - " </meta>\n" . - " <data>\n" . - " <test>hi</test>\n" . - " </data>\n" . - "</ocs>\n"; + $expected = "<?xml version=\"1.0\"?>\n" + . "<ocs>\n" + . " <meta>\n" + . " <status>ok</status>\n" + . " <statuscode>100</statuscode>\n" + . " <message>OK</message>\n" + . " <totalitems></totalitems>\n" + . " <itemsperpage></itemsperpage>\n" + . " </meta>\n" + . " <data>\n" + . " <test>hi</test>\n" + . " </data>\n" + . "</ocs>\n"; $params = new DataResponse(['test' => 'hi']); @@ -81,8 +81,8 @@ class OCSControllerTest extends \Test\TestCase { $this->createMock(IConfig::class) )); $controller->setOCSVersion(1); - $expected = '{"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK",' . - '"totalitems":"","itemsperpage":""},"data":{"test":"hi"}}}'; + $expected = '{"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK",' + . '"totalitems":"","itemsperpage":""},"data":{"test":"hi"}}}'; $params = new DataResponse(['test' => 'hi']); $response = $controller->buildResponse($params, 'json'); @@ -99,17 +99,17 @@ class OCSControllerTest extends \Test\TestCase { )); $controller->setOCSVersion(2); - $expected = "<?xml version=\"1.0\"?>\n" . - "<ocs>\n" . - " <meta>\n" . - " <status>ok</status>\n" . - " <statuscode>200</statuscode>\n" . - " <message>OK</message>\n" . - " </meta>\n" . - " <data>\n" . - " <test>hi</test>\n" . - " </data>\n" . - "</ocs>\n"; + $expected = "<?xml version=\"1.0\"?>\n" + . "<ocs>\n" + . " <meta>\n" + . " <status>ok</status>\n" + . " <statuscode>200</statuscode>\n" + . " <message>OK</message>\n" + . " </meta>\n" + . " <data>\n" + . " <test>hi</test>\n" + . " </data>\n" + . "</ocs>\n"; $params = new DataResponse(['test' => 'hi']); diff --git a/tests/lib/AppFramework/Controller/PublicShareControllerTest.php b/tests/lib/AppFramework/Controller/PublicShareControllerTest.php index 97216845617..e676b8a0d7e 100644 --- a/tests/lib/AppFramework/Controller/PublicShareControllerTest.php +++ b/tests/lib/AppFramework/Controller/PublicShareControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -67,9 +68,7 @@ class PublicShareControllerTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataIsAuthenticated - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataIsAuthenticated')] public function testIsAuthenticatedNotPasswordProtected(bool $protected, string $token1, string $token2, string $hash1, string $hash2, bool $expected): void { $controller = new TestController('app', $this->request, $this->session, $hash2, $protected); diff --git a/tests/lib/AppFramework/Db/EntityTest.php b/tests/lib/AppFramework/Db/EntityTest.php index 4fcf126e3b1..eab081e6ac6 100644 --- a/tests/lib/AppFramework/Db/EntityTest.php +++ b/tests/lib/AppFramework/Db/EntityTest.php @@ -225,9 +225,7 @@ class EntityTest extends \Test\TestCase { } - /** - * @dataProvider dataSetterCasts - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetterCasts')] public function testSetterCasts(string $field, mixed $in, mixed $out): void { $entity = new TestEntity(); $entity->{'set' . $field}($in); diff --git a/tests/lib/AppFramework/Db/QBMapperDBTest.php b/tests/lib/AppFramework/Db/QBMapperDBTest.php index a61240fcb82..614f1099644 100644 --- a/tests/lib/AppFramework/Db/QBMapperDBTest.php +++ b/tests/lib/AppFramework/Db/QBMapperDBTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -63,7 +64,7 @@ class QBDBTestMapper extends QBMapper { * @group DB */ class QBMapperDBTest extends TestCase { - /** @var \Doctrine\DBAL\Connection|\OCP\IDBConnection */ + /** @var \Doctrine\DBAL\Connection|IDBConnection */ protected $connection; protected $schemaSetup = false; diff --git a/tests/lib/AppFramework/Db/QBMapperTest.php b/tests/lib/AppFramework/Db/QBMapperTest.php index 1fac6632b30..0f18ef3f204 100644 --- a/tests/lib/AppFramework/Db/QBMapperTest.php +++ b/tests/lib/AppFramework/Db/QBMapperTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/AppFramework/Db/TransactionalTest.php b/tests/lib/AppFramework/Db/TransactionalTest.php index bf8abcd7aa2..72a3d9ae59f 100644 --- a/tests/lib/AppFramework/Db/TransactionalTest.php +++ b/tests/lib/AppFramework/Db/TransactionalTest.php @@ -28,10 +28,9 @@ class TransactionalTest extends TestCase { $test = new class($this->db) { use TTransactional; - private IDBConnection $db; - - public function __construct(IDBConnection $db) { - $this->db = $db; + public function __construct( + private IDBConnection $db, + ) { } public function fail(): void { @@ -55,10 +54,9 @@ class TransactionalTest extends TestCase { $test = new class($this->db) { use TTransactional; - private IDBConnection $db; - - public function __construct(IDBConnection $db) { - $this->db = $db; + public function __construct( + private IDBConnection $db, + ) { } public function succeed(): int { diff --git a/tests/lib/AppFramework/DependencyInjection/DIIntergrationTests.php b/tests/lib/AppFramework/DependencyInjection/DIIntergrationTests.php index 8f0e60c5b3b..219fd5134ae 100644 --- a/tests/lib/AppFramework/DependencyInjection/DIIntergrationTests.php +++ b/tests/lib/AppFramework/DependencyInjection/DIIntergrationTests.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php b/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php index aa2b29418e4..75527e7eaf8 100644 --- a/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php +++ b/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/AppFramework/Http/DispatcherTest.php b/tests/lib/AppFramework/Http/DispatcherTest.php index 4ed6627891c..86c78e840e0 100644 --- a/tests/lib/AppFramework/Http/DispatcherTest.php +++ b/tests/lib/AppFramework/Http/DispatcherTest.php @@ -32,7 +32,7 @@ use Psr\Log\LoggerInterface; class TestController extends Controller { /** * @param string $appName - * @param \OCP\IRequest $request + * @param IRequest $request */ public function __construct($appName, $request) { parent::__construct($appName, $request); @@ -547,9 +547,7 @@ class DispatcherTest extends \Test\TestCase { ]; } - /** - * @dataProvider rangeDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('rangeDataProvider')] public function testEnsureParameterValueSatisfiesRange(int $min, int $max, int $input, bool $throw): void { $this->reflector = $this->createMock(ControllerMethodReflector::class); $this->reflector->expects($this->any()) diff --git a/tests/lib/AppFramework/Http/DownloadResponseTest.php b/tests/lib/AppFramework/Http/DownloadResponseTest.php index cf179ba270b..b2f60edd999 100644 --- a/tests/lib/AppFramework/Http/DownloadResponseTest.php +++ b/tests/lib/AppFramework/Http/DownloadResponseTest.php @@ -27,9 +27,7 @@ class DownloadResponseTest extends \Test\TestCase { $this->assertEquals('content', $headers['Content-Type']); } - /** - * @dataProvider filenameEncodingProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('filenameEncodingProvider')] public function testFilenameEncoding(string $input, string $expected): void { $response = new ChildDownloadResponse($input, 'content'); $headers = $response->getHeaders(); diff --git a/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php b/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php index 3110f632fa7..66abce43cc4 100644 --- a/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php +++ b/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/AppFramework/Http/FileDisplayResponseTest.php b/tests/lib/AppFramework/Http/FileDisplayResponseTest.php index 5f602b2e1c6..029ddaad712 100644 --- a/tests/lib/AppFramework/Http/FileDisplayResponseTest.php +++ b/tests/lib/AppFramework/Http/FileDisplayResponseTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/AppFramework/Http/JSONResponseTest.php b/tests/lib/AppFramework/Http/JSONResponseTest.php index 703e6d89dd1..56f67b23f0d 100644 --- a/tests/lib/AppFramework/Http/JSONResponseTest.php +++ b/tests/lib/AppFramework/Http/JSONResponseTest.php @@ -58,10 +58,10 @@ class JSONResponseTest extends \Test\TestCase { } /** - * @dataProvider renderDataProvider * @param array $input * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('renderDataProvider')] public function testRender(array $input, $expected): void { $this->json->setData($input); $this->assertEquals($expected, $this->json->render()); diff --git a/tests/lib/AppFramework/Http/OutputTest.php b/tests/lib/AppFramework/Http/OutputTest.php index 58b17c08141..2ba93833dd1 100644 --- a/tests/lib/AppFramework/Http/OutputTest.php +++ b/tests/lib/AppFramework/Http/OutputTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/AppFramework/Http/RequestStream.php b/tests/lib/AppFramework/Http/RequestStream.php index 91259b26c9f..7340391b2d5 100644 --- a/tests/lib/AppFramework/Http/RequestStream.php +++ b/tests/lib/AppFramework/Http/RequestStream.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php index 781cca256ec..a7ff123fc25 100644 --- a/tests/lib/AppFramework/Http/RequestTest.php +++ b/tests/lib/AppFramework/Http/RequestTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -259,9 +260,7 @@ class RequestTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataNotJsonData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNotJsonData')] public function testNotJsonPost(string $testData): void { global $data; $data = $testData; @@ -708,9 +707,7 @@ class RequestTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataGetRemoteAddress - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetRemoteAddress')] public function testGetRemoteAddress(array $headers, array $trustedProxies, array $forwardedForHeaders, string $expected): void { $this->config ->method('getSystemValue') @@ -759,11 +756,11 @@ class RequestTest extends \Test\TestCase { } /** - * @dataProvider dataHttpProtocol * * @param mixed $input * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataHttpProtocol')] public function testGetHttpProtocol($input, $expected): void { $request = new Request( [ @@ -949,11 +946,11 @@ class RequestTest extends \Test\TestCase { } /** - * @dataProvider dataUserAgent * @param string $testAgent * @param array $userAgent * @param bool $matches */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataUserAgent')] public function testUserAgent($testAgent, $userAgent, $matches): void { $request = new Request( [ @@ -971,11 +968,11 @@ class RequestTest extends \Test\TestCase { } /** - * @dataProvider dataUserAgent * @param string $testAgent * @param array $userAgent * @param bool $matches */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataUserAgent')] public function testUndefinedUserAgent($testAgent, $userAgent, $matches): void { $request = new Request( [], @@ -1153,11 +1150,11 @@ class RequestTest extends \Test\TestCase { } /** - * @dataProvider dataMatchClientVersion * @param string $testAgent * @param string $userAgent * @param string $version */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataMatchClientVersion')] public function testMatchClientVersion(string $testAgent, string $userAgent, string $version): void { preg_match($userAgent, $testAgent, $matches); @@ -1372,9 +1369,7 @@ class RequestTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataGetServerHostTrustedDomain - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetServerHostTrustedDomain')] public function testGetServerHostTrustedDomain(string $expected, $trustedDomain): void { $this->config ->method('getSystemValue') @@ -1484,11 +1479,11 @@ class RequestTest extends \Test\TestCase { } /** - * @dataProvider dataGenericPathInfo * @param string $requestUri * @param string $scriptName * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGenericPathInfo')] public function testGetPathInfoWithoutSetEnvGeneric($requestUri, $scriptName, $expected): void { $request = new Request( [ @@ -1507,11 +1502,11 @@ class RequestTest extends \Test\TestCase { } /** - * @dataProvider dataGenericPathInfo * @param string $requestUri * @param string $scriptName * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGenericPathInfo')] public function testGetRawPathInfoWithoutSetEnvGeneric($requestUri, $scriptName, $expected): void { $request = new Request( [ @@ -1530,11 +1525,11 @@ class RequestTest extends \Test\TestCase { } /** - * @dataProvider dataRawPathInfo * @param string $requestUri * @param string $scriptName * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataRawPathInfo')] public function testGetRawPathInfoWithoutSetEnv($requestUri, $scriptName, $expected): void { $request = new Request( [ @@ -1553,11 +1548,11 @@ class RequestTest extends \Test\TestCase { } /** - * @dataProvider dataPathInfo * @param string $requestUri * @param string $scriptName * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPathInfo')] public function testGetPathInfoWithoutSetEnv($requestUri, $scriptName, $expected): void { $request = new Request( [ @@ -1628,9 +1623,7 @@ class RequestTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataGetRequestUriWithOverwrite - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetRequestUriWithOverwrite')] public function testGetRequestUriWithOverwrite($expectedUri, $overwriteWebRoot, $overwriteCondAddr, $remoteAddr = ''): void { $this->config ->expects($this->exactly(2)) @@ -2183,9 +2176,7 @@ class RequestTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataInvalidToken - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataInvalidToken')] public function testPassesCSRFCheckWithInvalidToken(string $invalidToken): void { /** @var Request $request */ $request = $this->getMockBuilder(Request::class) diff --git a/tests/lib/AppFramework/Http/ResponseTest.php b/tests/lib/AppFramework/Http/ResponseTest.php index 7750db921c6..4c76695f6e4 100644 --- a/tests/lib/AppFramework/Http/ResponseTest.php +++ b/tests/lib/AppFramework/Http/ResponseTest.php @@ -16,7 +16,7 @@ use OCP\AppFramework\Utility\ITimeFactory; class ResponseTest extends \Test\TestCase { /** - * @var \OCP\AppFramework\Http\Response + * @var Response */ private $childResponse; diff --git a/tests/lib/AppFramework/Http/TemplateResponseTest.php b/tests/lib/AppFramework/Http/TemplateResponseTest.php index ad0fe808b76..28f952e35e3 100644 --- a/tests/lib/AppFramework/Http/TemplateResponseTest.php +++ b/tests/lib/AppFramework/Http/TemplateResponseTest.php @@ -13,7 +13,7 @@ use OCP\AppFramework\Http\TemplateResponse; class TemplateResponseTest extends \Test\TestCase { /** - * @var \OCP\AppFramework\Http\TemplateResponse + * @var TemplateResponse */ private $tpl; diff --git a/tests/lib/AppFramework/Middleware/NotModifiedMiddlewareTest.php b/tests/lib/AppFramework/Middleware/NotModifiedMiddlewareTest.php index 0abbd9c614c..7dcb28a2af4 100644 --- a/tests/lib/AppFramework/Middleware/NotModifiedMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/NotModifiedMiddlewareTest.php @@ -54,9 +54,7 @@ class NotModifiedMiddlewareTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataModified - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataModified')] public function testMiddleware(?string $etag, string $etagHeader, ?\DateTime $lastModified, string $lastModifiedHeader, bool $notModifiedSet): void { $this->request->method('getHeader') ->willReturnCallback(function (string $name) use ($etagHeader, $lastModifiedHeader) { diff --git a/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php index b22646b8891..e5c6a417a4b 100644 --- a/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -60,9 +61,7 @@ class OCSMiddlewareTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataAfterException - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataAfterException')] public function testAfterExceptionOCSv1(string $controller, \Exception $exception, bool $forward, string $message = '', int $code = 0): void { $controller = $this->createMock($controller); $this->request @@ -91,9 +90,7 @@ class OCSMiddlewareTest extends \Test\TestCase { $this->assertSame(Http::STATUS_OK, $result->getStatus()); } - /** - * @dataProvider dataAfterException - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataAfterException')] public function testAfterExceptionOCSv2(string $controller, \Exception $exception, bool $forward, string $message = '', int $code = 0): void { $controller = $this->createMock($controller); $this->request @@ -120,9 +117,7 @@ class OCSMiddlewareTest extends \Test\TestCase { $this->assertSame($code, $result->getStatus()); } - /** - * @dataProvider dataAfterException - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataAfterException')] public function testAfterExceptionOCSv2SubFolder(string $controller, \Exception $exception, bool $forward, string $message = '', int $code = 0): void { $controller = $this->createMock($controller); $this->request @@ -166,9 +161,7 @@ class OCSMiddlewareTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataAfterController - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataAfterController')] public function testAfterController(string $controller, Response $response, bool $converted, int $convertedOCSStatus = 0): void { $controller = $this->createMock($controller); $OCSMiddleware = new OCSMiddleware($this->request); diff --git a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php index bf0d719f46e..e87ee7fd565 100644 --- a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -66,9 +67,7 @@ class PublicShareMiddlewareTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataShareApi - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataShareApi')] public function testBeforeControllerShareApiDisabled(string $shareApi, string $shareLinks): void { $controller = $this->createMock(PublicShareController::class); diff --git a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php index ae575fa947f..3fd2cb38a33 100644 --- a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php index 2132a4d511f..c325ae638fb 100644 --- a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2023 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc. @@ -52,9 +53,7 @@ class CORSMiddlewareTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataSetCORSAPIHeader - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetCORSAPIHeader')] public function testSetCORSAPIHeader(string $method): void { $request = new Request( [ @@ -97,9 +96,7 @@ class CORSMiddlewareTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataNoOriginHeaderNoCORSHEADER - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoOriginHeaderNoCORSHEADER')] public function testNoOriginHeaderNoCORSHEADER(string $method): void { $request = new Request( [], @@ -121,9 +118,7 @@ class CORSMiddlewareTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataCorsIgnoredIfWithCredentialsHeaderPresent - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCorsIgnoredIfWithCredentialsHeaderPresent')] public function testCorsIgnoredIfWithCredentialsHeaderPresent(string $method): void { $this->expectException(SecurityException::class); @@ -153,9 +148,7 @@ class CORSMiddlewareTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataNoCORSOnAnonymousPublicPage - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoCORSOnAnonymousPublicPage')] public function testNoCORSOnAnonymousPublicPage(string $method): void { $request = new Request( [], @@ -187,9 +180,7 @@ class CORSMiddlewareTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataCORSShouldNeverAllowCookieAuth - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCORSShouldNeverAllowCookieAuth')] public function testCORSShouldNeverAllowCookieAuth(string $method): void { $request = new Request( [], @@ -219,9 +210,7 @@ class CORSMiddlewareTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataCORSShouldRelogin - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCORSShouldRelogin')] public function testCORSShouldRelogin(string $method): void { $request = new Request( ['server' => [ @@ -250,9 +239,7 @@ class CORSMiddlewareTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataCORSShouldFailIfPasswordLoginIsForbidden - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCORSShouldFailIfPasswordLoginIsForbidden')] public function testCORSShouldFailIfPasswordLoginIsForbidden(string $method): void { $this->expectException(SecurityException::class); @@ -283,9 +270,7 @@ class CORSMiddlewareTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataCORSShouldNotAllowCookieAuth - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCORSShouldNotAllowCookieAuth')] public function testCORSShouldNotAllowCookieAuth(string $method): void { $this->expectException(SecurityException::class); diff --git a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php index e607b19d1ef..90e801ca471 100644 --- a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -90,9 +91,7 @@ class PasswordConfirmationMiddlewareTest extends TestCase { $this->middleware->beforeController($this->controller, __FUNCTION__); } - /** - * @dataProvider dataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')] public function testAnnotation($backend, $lastConfirm, $currentTime, $exception): void { $this->reflector->reflect($this->controller, __FUNCTION__); @@ -125,9 +124,7 @@ class PasswordConfirmationMiddlewareTest extends TestCase { $this->assertSame($exception, $thrown); } - /** - * @dataProvider dataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')] public function testAttribute($backend, $lastConfirm, $currentTime, $exception): void { $this->reflector->reflect($this->controller, __FUNCTION__); diff --git a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php index 44897fa21ef..7800371f68f 100644 --- a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php index 183f1aa7477..0c6fc21357d 100644 --- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -194,9 +195,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataNoCSRFRequiredPublicPage - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoCSRFRequiredPublicPage')] public function testSetNavigationEntry(string $method): void { $this->navigationManager->expects($this->once()) ->method('setActiveEntry') @@ -244,9 +243,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { ); } - /** - * @dataProvider dataNoCSRFRequired - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoCSRFRequired')] public function testAjaxNotAdminCheck(string $method): void { $this->ajaxExceptionStatus( $method, @@ -255,9 +252,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { ); } - /** - * @dataProvider dataPublicPage - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPublicPage')] public function testAjaxStatusCSRFCheck(string $method): void { $this->ajaxExceptionStatus( $method, @@ -266,9 +261,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { ); } - /** - * @dataProvider dataNoCSRFRequiredPublicPage - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoCSRFRequiredPublicPage')] public function testAjaxStatusAllGood(string $method): void { $this->ajaxExceptionStatus( $method, @@ -287,9 +280,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { ); } - /** - * @dataProvider dataNoCSRFRequiredPublicPage - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoCSRFRequiredPublicPage')] public function testNoChecks(string $method): void { $this->request->expects($this->never()) ->method('passesCSRFCheck') @@ -328,9 +319,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { } - /** - * @dataProvider dataPublicPage - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPublicPage')] public function testCsrfCheck(string $method): void { $this->expectException(CrossSiteRequestForgeryException::class); @@ -344,9 +333,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->middleware->beforeController($this->controller, $method); } - /** - * @dataProvider dataNoCSRFRequiredPublicPage - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoCSRFRequiredPublicPage')] public function testNoCsrfCheck(string $method): void { $this->request->expects($this->never()) ->method('passesCSRFCheck') @@ -356,9 +343,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->middleware->beforeController($this->controller, $method); } - /** - * @dataProvider dataPublicPage - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPublicPage')] public function testPassesCsrfCheck(string $method): void { $this->request->expects($this->once()) ->method('passesCSRFCheck') @@ -371,9 +356,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->middleware->beforeController($this->controller, $method); } - /** - * @dataProvider dataPublicPage - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPublicPage')] public function testFailCsrfCheck(string $method): void { $this->expectException(CrossSiteRequestForgeryException::class); @@ -388,9 +371,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->middleware->beforeController($this->controller, $method); } - /** - * @dataProvider dataPublicPageStrictCookieRequired - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPublicPageStrictCookieRequired')] public function testStrictCookieRequiredCheck(string $method): void { $this->expectException(\OC\AppFramework\Middleware\Security\Exceptions\StrictCookieMissingException::class); @@ -404,9 +385,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->middleware->beforeController($this->controller, $method); } - /** - * @dataProvider dataNoCSRFRequiredPublicPage - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoCSRFRequiredPublicPage')] public function testNoStrictCookieRequiredCheck(string $method): void { $this->request->expects($this->never()) ->method('passesStrictCookieCheck') @@ -416,9 +395,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->middleware->beforeController($this->controller, $method); } - /** - * @dataProvider dataNoCSRFRequiredPublicPageStrictCookieRequired - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoCSRFRequiredPublicPageStrictCookieRequired')] public function testPassesStrictCookieRequiredCheck(string $method): void { $this->request ->expects($this->once()) @@ -444,12 +421,12 @@ class SecurityMiddlewareTest extends \Test\TestCase { } /** - * @dataProvider dataCsrfOcsController * @param string $controllerClass * @param bool $hasOcsApiHeader * @param bool $hasBearerAuth * @param bool $exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCsrfOcsController')] public function testCsrfOcsController(string $controllerClass, bool $hasOcsApiHeader, bool $hasBearerAuth, bool $exception): void { $this->request ->method('getHeader') @@ -476,30 +453,22 @@ class SecurityMiddlewareTest extends \Test\TestCase { } } - /** - * @dataProvider dataNoAdminRequiredNoCSRFRequired - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoAdminRequiredNoCSRFRequired')] public function testLoggedInCheck(string $method): void { $this->securityCheck($method, 'isLoggedIn'); } - /** - * @dataProvider dataNoAdminRequiredNoCSRFRequired - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoAdminRequiredNoCSRFRequired')] public function testFailLoggedInCheck(string $method): void { $this->securityCheck($method, 'isLoggedIn', true); } - /** - * @dataProvider dataNoCSRFRequired - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoCSRFRequired')] public function testIsAdminCheck(string $method): void { $this->securityCheck($method, 'isAdminUser'); } - /** - * @dataProvider dataNoCSRFRequiredSubAdminRequired - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoCSRFRequiredSubAdminRequired')] public function testIsNotSubAdminCheck(string $method): void { $this->reader->reflect($this->controller, $method); $sec = $this->getMiddleware(true, false, false); @@ -508,9 +477,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $sec->beforeController($this->controller, $method); } - /** - * @dataProvider dataNoCSRFRequiredSubAdminRequired - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoCSRFRequiredSubAdminRequired')] public function testIsSubAdminCheck(string $method): void { $this->reader->reflect($this->controller, $method); $sec = $this->getMiddleware(true, false, true); @@ -519,9 +486,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->addToAssertionCount(1); } - /** - * @dataProvider dataNoCSRFRequiredSubAdminRequired - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoCSRFRequiredSubAdminRequired')] public function testIsSubAdminAndAdminCheck(string $method): void { $this->reader->reflect($this->controller, $method); $sec = $this->getMiddleware(true, true, true); @@ -530,16 +495,12 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->addToAssertionCount(1); } - /** - * @dataProvider dataNoCSRFRequired - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoCSRFRequired')] public function testFailIsAdminCheck(string $method): void { $this->securityCheck($method, 'isAdminUser', true); } - /** - * @dataProvider dataNoAdminRequiredNoCSRFRequiredPublicPage - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoAdminRequiredNoCSRFRequiredPublicPage')] public function testRestrictedAppLoggedInPublicPage(string $method): void { $middleware = $this->getMiddleware(true, false, false); $this->reader->reflect($this->controller, $method); @@ -556,9 +517,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->addToAssertionCount(1); } - /** - * @dataProvider dataNoAdminRequiredNoCSRFRequiredPublicPage - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoAdminRequiredNoCSRFRequiredPublicPage')] public function testRestrictedAppNotLoggedInPublicPage(string $method): void { $middleware = $this->getMiddleware(false, false, false); $this->reader->reflect($this->controller, $method); @@ -575,9 +534,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->addToAssertionCount(1); } - /** - * @dataProvider dataNoAdminRequiredNoCSRFRequired - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNoAdminRequiredNoCSRFRequired')] public function testRestrictedAppLoggedIn(string $method): void { $middleware = $this->getMiddleware(true, false, false, false); $this->reader->reflect($this->controller, $method); @@ -600,8 +557,8 @@ class SecurityMiddlewareTest extends \Test\TestCase { public function testAfterExceptionReturnsRedirectForNotLoggedInUser(): void { $this->request = new Request( [ - 'server' => - [ + 'server' + => [ 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'REQUEST_URI' => 'nextcloud/index.php/apps/specialapp' ] @@ -674,14 +631,14 @@ class SecurityMiddlewareTest extends \Test\TestCase { } /** - * @dataProvider exceptionProvider * @param SecurityException $exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('exceptionProvider')] public function testAfterExceptionReturnsTemplateResponse(SecurityException $exception): void { $this->request = new Request( [ - 'server' => - [ + 'server' + => [ 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'REQUEST_URI' => 'nextcloud/index.php/apps/specialapp' ] @@ -710,9 +667,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->assertTrue($response instanceof JSONResponse); } - /** - * @dataProvider dataExAppRequired - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataExAppRequired')] public function testExAppRequired(string $method): void { $middleware = $this->getMiddleware(true, false, false); $this->reader->reflect($this->controller, $method); @@ -731,9 +686,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $middleware->beforeController($this->controller, $method); } - /** - * @dataProvider dataExAppRequired - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataExAppRequired')] public function testExAppRequiredError(string $method): void { $middleware = $this->getMiddleware(true, false, false, false); $this->reader->reflect($this->controller, $method); diff --git a/tests/lib/AppFramework/OCS/BaseResponseTest.php b/tests/lib/AppFramework/OCS/BaseResponseTest.php index a04f517db0b..e04f7856623 100644 --- a/tests/lib/AppFramework/OCS/BaseResponseTest.php +++ b/tests/lib/AppFramework/OCS/BaseResponseTest.php @@ -50,7 +50,7 @@ class BaseResponseTest extends \Test\TestCase { $writer->outputMemory(true) ); } - + public function testToXmlJsonSerializable(): void { /** @var BaseResponse $response */ $response = $this->createMock(BaseResponse::class); diff --git a/tests/lib/AppFramework/OCS/V2ResponseTest.php b/tests/lib/AppFramework/OCS/V2ResponseTest.php index 0037763f163..7a70ad6d633 100644 --- a/tests/lib/AppFramework/OCS/V2ResponseTest.php +++ b/tests/lib/AppFramework/OCS/V2ResponseTest.php @@ -15,9 +15,7 @@ use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; class V2ResponseTest extends \Test\TestCase { - /** - * @dataProvider providesStatusCodes - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesStatusCodes')] public function testStatusCodeMapper(int $expected, int $sc): void { $response = new V2Response(new DataResponse([], $sc)); $this->assertEquals($expected, $response->getStatus()); diff --git a/tests/lib/AppFramework/Services/AppConfigTest.php b/tests/lib/AppFramework/Services/AppConfigTest.php index 718817a7636..38fa6bdcac6 100644 --- a/tests/lib/AppFramework/Services/AppConfigTest.php +++ b/tests/lib/AppFramework/Services/AppConfigTest.php @@ -57,11 +57,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerHasAppKey * * @param bool $lazy * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerHasAppKey')] public function testHasAppKey(bool $lazy, bool $expected): void { $key = 'key'; $this->appConfigCore->expects($this->once()) @@ -87,11 +87,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerIsSensitive * * @param bool $lazy * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerIsSensitive')] public function testIsSensitive(bool $lazy, bool $expected): void { $key = 'key'; $this->appConfigCore->expects($this->once()) @@ -103,11 +103,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerIsSensitive * * @param bool $lazy * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerIsSensitive')] public function testIsSensitiveException(bool $lazy, bool $expected): void { $key = 'unknown-key'; $this->appConfigCore->expects($this->once()) @@ -132,10 +132,9 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerIsLazy - * * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerIsLazy')] public function testIsLazy(bool $expected): void { $key = 'key'; $this->appConfigCore->expects($this->once()) @@ -172,11 +171,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetAllAppValues * * @param string $key * @param bool $filtered */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAllAppValues')] public function testGetAllAppValues(string $key, bool $filtered): void { $expected = [ 'key1' => 'value1', @@ -229,12 +228,12 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerSetAppValue * * @param bool $lazy * @param bool $sensitive * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetAppValue')] public function testSetAppValueString(bool $lazy, bool $sensitive, bool $expected): void { $key = 'key'; $value = 'valueString'; @@ -247,11 +246,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerSetAppValue * * @param bool $lazy * @param bool $sensitive */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetAppValue')] public function testSetAppValueStringException(bool $lazy, bool $sensitive): void { $key = 'key'; $value = 'valueString'; @@ -265,12 +264,12 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerSetAppValue * * @param bool $lazy * @param bool $sensitive * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetAppValue')] public function testSetAppValueInt(bool $lazy, bool $sensitive, bool $expected): void { $key = 'key'; $value = 42; @@ -283,11 +282,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerSetAppValue * * @param bool $lazy * @param bool $sensitive */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetAppValue')] public function testSetAppValueIntException(bool $lazy, bool $sensitive): void { $key = 'key'; $value = 42; @@ -301,12 +300,12 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerSetAppValue * * @param bool $lazy * @param bool $sensitive * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetAppValue')] public function testSetAppValueFloat(bool $lazy, bool $sensitive, bool $expected): void { $key = 'key'; $value = 3.14; @@ -319,11 +318,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerSetAppValue * * @param bool $lazy * @param bool $sensitive */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetAppValue')] public function testSetAppValueFloatException(bool $lazy, bool $sensitive): void { $key = 'key'; $value = 3.14; @@ -351,11 +350,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerSetAppValueBool * * @param bool $lazy * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetAppValueBool')] public function testSetAppValueBool(bool $lazy, bool $expected): void { $key = 'key'; $value = true; @@ -368,10 +367,9 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerSetAppValueBool - * * @param bool $lazy */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetAppValueBool')] public function testSetAppValueBoolException(bool $lazy): void { $key = 'key'; $value = true; @@ -385,12 +383,12 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerSetAppValue * * @param bool $lazy * @param bool $sensitive * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetAppValue')] public function testSetAppValueArray(bool $lazy, bool $sensitive, bool $expected): void { $key = 'key'; $value = ['item' => true]; @@ -403,11 +401,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerSetAppValue * * @param bool $lazy * @param bool $sensitive */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetAppValue')] public function testSetAppValueArrayException(bool $lazy, bool $sensitive): void { $key = 'key'; $value = ['item' => true]; @@ -467,11 +465,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetAppValue * * @param bool $lazy * @param bool $exist */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAppValue')] public function testGetAppValueString(bool $lazy, bool $exist): void { $key = 'key'; $value = 'valueString'; @@ -487,10 +485,9 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetAppValue - * * @param bool $lazy */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAppValue')] public function testGetAppValueStringException(bool $lazy): void { $key = 'key'; $default = 'default'; @@ -505,11 +502,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetAppValue * * @param bool $lazy * @param bool $exist */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAppValue')] public function testGetAppValueInt(bool $lazy, bool $exist): void { $key = 'key'; $value = 42; @@ -525,10 +522,9 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetAppValue - * * @param bool $lazy */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAppValue')] public function testGetAppValueIntException(bool $lazy): void { $key = 'key'; $default = 17; @@ -543,11 +539,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetAppValue * * @param bool $lazy * @param bool $exist */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAppValue')] public function testGetAppValueFloat(bool $lazy, bool $exist): void { $key = 'key'; $value = 3.14; @@ -563,10 +559,9 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetAppValue - * * @param bool $lazy */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAppValue')] public function testGetAppValueFloatException(bool $lazy): void { $key = 'key'; $default = 17.04; @@ -581,11 +576,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetAppValue * * @param bool $lazy * @param bool $exist */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAppValue')] public function testGetAppValueBool(bool $lazy, bool $exist): void { $key = 'key'; $value = true; @@ -601,10 +596,9 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetAppValue - * * @param bool $lazy */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAppValue')] public function testGetAppValueBoolException(bool $lazy): void { $key = 'key'; $default = false; @@ -619,11 +613,11 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetAppValue * * @param bool $lazy * @param bool $exist */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAppValue')] public function testGetAppValueArray(bool $lazy, bool $exist): void { $key = 'key'; $value = ['item' => true]; @@ -639,10 +633,9 @@ class AppConfigTest extends TestCase { } /** - * @dataProvider providerGetAppValue - * * @param bool $lazy */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAppValue')] public function testGetAppValueArrayException(bool $lazy): void { $key = 'key'; $default = []; diff --git a/tests/lib/AppFramework/Utility/SimpleContainerTest.php b/tests/lib/AppFramework/Utility/SimpleContainerTest.php index 93db01d3bc8..33800c7376f 100644 --- a/tests/lib/AppFramework/Utility/SimpleContainerTest.php +++ b/tests/lib/AppFramework/Utility/SimpleContainerTest.php @@ -201,9 +201,7 @@ class SimpleContainerTest extends \Test\TestCase { ]; } - /** - * @dataProvider sanitizeNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('sanitizeNameProvider')] public function testSanitizeName($register, $query): void { $this->container->registerService($register, function () { return 'abc'; diff --git a/tests/lib/AppScriptSortTest.php b/tests/lib/AppScriptSortTest.php index ae7b5c326ec..7dc2bde1897 100644 --- a/tests/lib/AppScriptSortTest.php +++ b/tests/lib/AppScriptSortTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/AppTest.php b/tests/lib/AppTest.php index 07205c730ce..e174a59bfaf 100644 --- a/tests/lib/AppTest.php +++ b/tests/lib/AppTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -313,9 +314,7 @@ class AppTest extends \Test\TestCase { ]; } - /** - * @dataProvider appVersionsProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('appVersionsProvider')] public function testIsAppCompatible($ocVersion, $appInfo, $expectedResult): void { $this->assertEquals($expectedResult, \OC_App::isAppCompatible($ocVersion, $appInfo)); } @@ -467,9 +466,8 @@ class AppTest extends \Test\TestCase { /** * Test enabled apps - * - * @dataProvider appConfigValuesProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('appConfigValuesProvider')] public function testEnabledApps($user, $expectedApps, $forceAll): void { $userManager = Server::get(IUserManager::class); $groupManager = Server::get(IGroupManager::class); @@ -574,7 +572,7 @@ class AppTest extends \Test\TestCase { Server::get(IEventDispatcher::class), Server::get(LoggerInterface::class), Server::get(ServerVersion::class), - \OCP\Server::get(ConfigManager::class), + Server::get(ConfigManager::class), )); } @@ -623,10 +621,10 @@ class AppTest extends \Test\TestCase { /** * Test app info parser * - * @dataProvider appDataProvider * @param array $data * @param array $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('appDataProvider')] public function testParseAppInfo(array $data, array $expected): void { $this->assertSame($expected, \OC_App::parseAppInfo($data)); } diff --git a/tests/lib/Archive/TARTest.php b/tests/lib/Archive/TARTest.php index 3a0a02fdbbd..e77f97ac8e1 100644 --- a/tests/lib/Archive/TARTest.php +++ b/tests/lib/Archive/TARTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Archive/TestBase.php b/tests/lib/Archive/TestBase.php index a4ff579d244..1b7f7d3325a 100644 --- a/tests/lib/Archive/TestBase.php +++ b/tests/lib/Archive/TestBase.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Archive/ZIPTest.php b/tests/lib/Archive/ZIPTest.php index 272824980a7..0996d5abf61 100644 --- a/tests/lib/Archive/ZIPTest.php +++ b/tests/lib/Archive/ZIPTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Authentication/Login/ALoginTestCommand.php b/tests/lib/Authentication/Login/ALoginTestCommand.php index 502380bc3fe..b955b20beba 100644 --- a/tests/lib/Authentication/Login/ALoginTestCommand.php +++ b/tests/lib/Authentication/Login/ALoginTestCommand.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Authentication/Token/ManagerTest.php b/tests/lib/Authentication/Token/ManagerTest.php index 300517fab4a..58bbe236248 100644 --- a/tests/lib/Authentication/Token/ManagerTest.php +++ b/tests/lib/Authentication/Token/ManagerTest.php @@ -157,9 +157,7 @@ class ManagerTest extends TestCase { } } - /** - * @dataProvider tokenData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('tokenData')] public function testUpdateToken(IToken|string $token): void { if (is_string($token)) { $token = $this->createMock($token); @@ -172,9 +170,7 @@ class ManagerTest extends TestCase { $this->manager->updateToken($token); } - /** - * @dataProvider tokenData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('tokenData')] public function testUpdateTokenActivity(IToken|string $token): void { if (is_string($token)) { $token = $this->createMock($token); @@ -187,9 +183,7 @@ class ManagerTest extends TestCase { $this->manager->updateTokenActivity($token); } - /** - * @dataProvider tokenData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('tokenData')] public function testGetPassword(IToken|string $token): void { if (is_string($token)) { $token = $this->createMock($token); @@ -204,9 +198,7 @@ class ManagerTest extends TestCase { $this->assertSame('password', $result); } - /** - * @dataProvider tokenData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('tokenData')] public function testSetPassword(IToken|string $token): void { if (is_string($token)) { $token = $this->createMock($token); diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php index c6c4ec4198f..7e7f949965f 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php @@ -386,12 +386,12 @@ class PublicKeyTokenProviderTest extends TestCase { ->expects($this->once()) ->method('insert') ->with($this->callback(function (PublicKeyToken $token) use ($user, $uid, $name) { - return $token->getUID() === $uid && - $token->getLoginName() === $user && - $token->getName() === $name && - $token->getType() === IToken::DO_NOT_REMEMBER && - $token->getLastActivity() === $this->time && - $token->getPassword() === null; + return $token->getUID() === $uid + && $token->getLoginName() === $user + && $token->getName() === $name + && $token->getType() === IToken::DO_NOT_REMEMBER + && $token->getLastActivity() === $this->time + && $token->getPassword() === null; })); $this->mapper ->expects($this->once()) @@ -426,13 +426,13 @@ class PublicKeyTokenProviderTest extends TestCase { ->expects($this->once()) ->method('insert') ->with($this->callback(function (PublicKeyToken $token) use ($user, $uid, $name): bool { - return $token->getUID() === $uid && - $token->getLoginName() === $user && - $token->getName() === $name && - $token->getType() === IToken::DO_NOT_REMEMBER && - $token->getLastActivity() === $this->time && - $token->getPassword() !== null && - $this->tokenProvider->getPassword($token, 'newIdtokentokentokentoken') === 'password'; + return $token->getUID() === $uid + && $token->getLoginName() === $user + && $token->getName() === $name + && $token->getType() === IToken::DO_NOT_REMEMBER + && $token->getLastActivity() === $this->time + && $token->getPassword() !== null + && $this->tokenProvider->getPassword($token, 'newIdtokentokentokentoken') === 'password'; })); $this->mapper ->expects($this->once()) diff --git a/tests/lib/Authentication/TwoFactorAuth/EnforcementStateTest.php b/tests/lib/Authentication/TwoFactorAuth/EnforcementStateTest.php index 5323a36867a..f1d38c10801 100644 --- a/tests/lib/Authentication/TwoFactorAuth/EnforcementStateTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/EnforcementStateTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php index c68d1de60c5..a2bed8a3652 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php @@ -218,9 +218,8 @@ class ManagerTest extends TestCase { * enabled providers. * * If any of these providers is active, 2FA is enabled - * - * @dataProvider providerStatesFixData */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerStatesFixData')] public function testIsTwoFactorAuthenticatedFixesProviderStates(bool $providerEnabled, bool $expected): void { $this->providerRegistry->expects($this->once()) ->method('getProviderStates') diff --git a/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php index 6004e67603b..a1f2a6fa69a 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php @@ -42,7 +42,7 @@ class ProviderManagerTest extends TestCase { ); } - + public function testTryEnableInvalidProvider(): void { $this->expectException(InvalidProviderException::class); @@ -88,7 +88,7 @@ class ProviderManagerTest extends TestCase { $this->assertTrue($res); } - + public function testTryDisableInvalidProvider(): void { $this->expectException(InvalidProviderException::class); diff --git a/tests/lib/Avatar/AvatarManagerTest.php b/tests/lib/Avatar/AvatarManagerTest.php index 5fac90e0f34..23d3b9d1c2a 100644 --- a/tests/lib/Avatar/AvatarManagerTest.php +++ b/tests/lib/Avatar/AvatarManagerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -203,9 +204,7 @@ class AvatarManagerTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataGetAvatarScopes - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetAvatarScopes')] public function testGetAvatarScopes($avatarScope, $isPublicCall, $isKnownUser, $expectedPlaceholder): void { if ($isPublicCall) { $requestingUser = null; diff --git a/tests/lib/Avatar/UserAvatarTest.php b/tests/lib/Avatar/UserAvatarTest.php index ead829c231c..03a868c7854 100644 --- a/tests/lib/Avatar/UserAvatarTest.php +++ b/tests/lib/Avatar/UserAvatarTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -26,10 +27,10 @@ class UserAvatarTest extends \Test\TestCase { /** @var \OC\Avatar\UserAvatar */ private $avatar; - /** @var \OC\User\User | \PHPUnit\Framework\MockObject\MockObject $user */ + /** @var User|\PHPUnit\Framework\MockObject\MockObject $user */ private $user; - /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; protected function setUp(): void { @@ -246,9 +247,7 @@ class UserAvatarTest extends \Test\TestCase { } - /** - * @dataProvider avatarTextData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('avatarTextData')] public function testGetAvatarText($displayName, $expectedAvatarText): void { $user = $this->getUserWithDisplayName($displayName); $avatar = $this->getUserAvatar($user); @@ -286,7 +285,7 @@ class UserAvatarTest extends \Test\TestCase { } private function getUserAvatar($user) { - /** @var \OCP\IL10N | \PHPUnit\Framework\MockObject\MockObject $l */ + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject $l */ $l = $this->createMock(IL10N::class); $l->method('t')->willReturnArgument(0); diff --git a/tests/lib/BackgroundJob/DummyJobList.php b/tests/lib/BackgroundJob/DummyJobList.php index fac9db28b01..717db52715f 100644 --- a/tests/lib/BackgroundJob/DummyJobList.php +++ b/tests/lib/BackgroundJob/DummyJobList.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -9,6 +10,7 @@ namespace Test\BackgroundJob; use OC\BackgroundJob\JobList; use OCP\BackgroundJob\IJob; +use OCP\BackgroundJob\Job; use OCP\Server; /** @@ -131,7 +133,7 @@ class DummyJobList extends JobList { /** * set the job that was last ran * - * @param \OCP\BackgroundJob\Job $job + * @param Job $job */ public function setLastJob(IJob $job): void { $i = array_search($job, $this->jobs); diff --git a/tests/lib/BackgroundJob/JobListTest.php b/tests/lib/BackgroundJob/JobListTest.php index 2c3461f22cd..d816bf707e8 100644 --- a/tests/lib/BackgroundJob/JobListTest.php +++ b/tests/lib/BackgroundJob/JobListTest.php @@ -30,13 +30,13 @@ class JobListTest extends TestCase { /** @var \OC\BackgroundJob\JobList */ protected $instance; - /** @var \OCP\IDBConnection */ + /** @var IDBConnection */ protected $connection; - /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \OCP\AppFramework\Utility\ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $timeFactory; private bool $ran = false; @@ -90,9 +90,9 @@ class JobListTest extends TestCase { } /** - * @dataProvider argumentProvider * @param $argument */ + #[\PHPUnit\Framework\Attributes\DataProvider('argumentProvider')] public function testAddRemove($argument): void { $existingJobs = $this->getAllSorted(); $job = new TestJob(); @@ -112,9 +112,9 @@ class JobListTest extends TestCase { } /** - * @dataProvider argumentProvider * @param $argument */ + #[\PHPUnit\Framework\Attributes\DataProvider('argumentProvider')] public function testRemoveDifferentArgument($argument): void { $existingJobs = $this->getAllSorted(); $job = new TestJob(); @@ -133,9 +133,9 @@ class JobListTest extends TestCase { } /** - * @dataProvider argumentProvider * @param $argument */ + #[\PHPUnit\Framework\Attributes\DataProvider('argumentProvider')] public function testHas($argument): void { $job = new TestJob(); $this->assertFalse($this->instance->has($job, $argument)); @@ -149,9 +149,9 @@ class JobListTest extends TestCase { } /** - * @dataProvider argumentProvider * @param $argument */ + #[\PHPUnit\Framework\Attributes\DataProvider('argumentProvider')] public function testHasDifferentArgument($argument): void { $job = new TestJob(); $this->instance->add($job, $argument); @@ -241,9 +241,9 @@ class JobListTest extends TestCase { } /** - * @dataProvider argumentProvider * @param $argument */ + #[\PHPUnit\Framework\Attributes\DataProvider('argumentProvider')] public function testGetById($argument): void { $job = new TestJob(); $this->instance->add($job, $argument); diff --git a/tests/lib/BackgroundJob/JobTest.php b/tests/lib/BackgroundJob/JobTest.php index 485f64eca9a..b67059f0380 100644 --- a/tests/lib/BackgroundJob/JobTest.php +++ b/tests/lib/BackgroundJob/JobTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/BackgroundJob/QueuedJobTest.php b/tests/lib/BackgroundJob/QueuedJobTest.php index ad01dae0a31..1c0946ff2f2 100644 --- a/tests/lib/BackgroundJob/QueuedJobTest.php +++ b/tests/lib/BackgroundJob/QueuedJobTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/BackgroundJob/TestJob.php b/tests/lib/BackgroundJob/TestJob.php index f4e2b31594b..ac18530ac7f 100644 --- a/tests/lib/BackgroundJob/TestJob.php +++ b/tests/lib/BackgroundJob/TestJob.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2020-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/BackgroundJob/TestParallelAwareJob.php b/tests/lib/BackgroundJob/TestParallelAwareJob.php index fb49dd671ce..6efb1a1fd8d 100644 --- a/tests/lib/BackgroundJob/TestParallelAwareJob.php +++ b/tests/lib/BackgroundJob/TestParallelAwareJob.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/BackgroundJob/TimedJobTest.php b/tests/lib/BackgroundJob/TimedJobTest.php index 27f9c64499c..d56240eb75e 100644 --- a/tests/lib/BackgroundJob/TimedJobTest.php +++ b/tests/lib/BackgroundJob/TimedJobTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Cache/CappedMemoryCacheTest.php b/tests/lib/Cache/CappedMemoryCacheTest.php index f0cf9aa280b..b9731c7cdde 100644 --- a/tests/lib/Cache/CappedMemoryCacheTest.php +++ b/tests/lib/Cache/CappedMemoryCacheTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Cache/FileCacheTest.php b/tests/lib/Cache/FileCacheTest.php index a60609782f0..4daa8d3b7ef 100644 --- a/tests/lib/Cache/FileCacheTest.php +++ b/tests/lib/Cache/FileCacheTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -10,6 +11,7 @@ namespace Test\Cache; use OC\Cache\File; use OC\Files\Filesystem; use OC\Files\Storage\Local; +use OC\Files\Storage\Storage; use OC\Files\Storage\Temporary; use OC\Files\View; use OCP\Files\LockNotAcquiredException; @@ -38,11 +40,11 @@ class FileCacheTest extends TestCache { * */ private $datadir; /** - * @var \OC\Files\Storage\Storage + * @var Storage * */ private $storage; /** - * @var \OC\Files\View + * @var View * */ private $rootView; @@ -140,9 +142,7 @@ class FileCacheTest extends TestCache { ]; } - /** - * @dataProvider lockExceptionProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('lockExceptionProvider')] public function testGarbageCollectIgnoreLockedKeys($testException): void { $mockStorage = $this->setupMockStorage(); diff --git a/tests/lib/Cache/TestCache.php b/tests/lib/Cache/TestCache.php index 3245cd90a38..ec150152816 100644 --- a/tests/lib/Cache/TestCache.php +++ b/tests/lib/Cache/TestCache.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -7,9 +8,11 @@ namespace Test\Cache; +use OCP\ICache; + abstract class TestCache extends \Test\TestCase { /** - * @var \OCP\ICache cache; + * @var ICache cache; */ protected $instance; @@ -24,7 +27,7 @@ abstract class TestCache extends \Test\TestCase { public function testSimple(): void { $this->assertNull($this->instance->get('value1')); $this->assertFalse($this->instance->hasKey('value1')); - + $value = 'foobar'; $this->instance->set('value1', $value); $this->assertTrue($this->instance->hasKey('value1')); diff --git a/tests/lib/Calendar/ManagerTest.php b/tests/lib/Calendar/ManagerTest.php index 7f8afc0247b..fec2cfa0efe 100644 --- a/tests/lib/Calendar/ManagerTest.php +++ b/tests/lib/Calendar/ManagerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -143,9 +144,7 @@ class ManagerTest extends TestCase { } - /** - * @dataProvider searchProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('searchProvider')] public function testSearch($search1, $search2, $expected): void { /** @var ICalendar | MockObject $calendar1 */ $calendar1 = $this->createMock(ICalendar::class); @@ -170,9 +169,7 @@ class ManagerTest extends TestCase { $this->assertEquals($expected, $result); } - /** - * @dataProvider searchProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('searchProvider')] public function testSearchOptions($search1, $search2, $expected): void { /** @var ICalendar | MockObject $calendar1 */ $calendar1 = $this->createMock(ICalendar::class); diff --git a/tests/lib/CapabilitiesManagerTest.php b/tests/lib/CapabilitiesManagerTest.php index 5206a28aa76..e5bf7b03dee 100644 --- a/tests/lib/CapabilitiesManagerTest.php +++ b/tests/lib/CapabilitiesManagerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php index 8fe71234906..a4ecd598562 100644 --- a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -417,7 +418,6 @@ class GroupPluginTest extends TestCase { } /** - * @dataProvider dataGetGroups * * @param string $searchTerm * @param bool $shareWithGroupOnly @@ -430,6 +430,7 @@ class GroupPluginTest extends TestCase { * @param bool $reachedEnd * @param bool|IGroup $singleGroup */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetGroups')] public function testSearch( string $searchTerm, bool $shareWithGroupOnly, diff --git a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php index d74dfca3be9..ac9b196ea1e 100644 --- a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -117,9 +118,9 @@ class LookupPluginTest extends TestCase { } /** - * @dataProvider searchDataProvider * @param array $searchParams */ + #[\PHPUnit\Framework\Attributes\DataProvider('searchDataProvider')] public function testSearch(array $searchParams): void { $type = new SearchResultType('lookup'); @@ -175,11 +176,11 @@ class LookupPluginTest extends TestCase { /** - * @dataProvider dataSearchEnableDisableLookupServer * @param array $searchParams * @param bool $GSEnabled * @param bool $LookupEnabled */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSearchEnableDisableLookupServer')] public function testSearchEnableDisableLookupServer(array $searchParams, $GSEnabled, $LookupEnabled): void { $type = new SearchResultType('lookup'); diff --git a/tests/lib/Collaboration/Collaborators/MailPluginTest.php b/tests/lib/Collaboration/Collaborators/MailPluginTest.php index 61afeb7897c..502b7844a2a 100644 --- a/tests/lib/Collaboration/Collaborators/MailPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/MailPluginTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -86,7 +87,6 @@ class MailPluginTest extends TestCase { } /** - * @dataProvider dataGetEmail * * @param string $searchTerm * @param array $contacts @@ -94,6 +94,7 @@ class MailPluginTest extends TestCase { * @param array $expected * @param bool $reachedEnd */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetEmail')] public function testSearch($searchTerm, $contacts, $shareeEnumeration, $expected, $exactIdMatch, $reachedEnd, $validEmail): void { $this->config->expects($this->any()) ->method('getAppValue') @@ -568,7 +569,6 @@ class MailPluginTest extends TestCase { } /** - * @dataProvider dataGetEmailGroupsOnly * * @param string $searchTerm * @param array $contacts @@ -577,6 +577,7 @@ class MailPluginTest extends TestCase { * @param bool $reachedEnd * @param array groups */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetEmailGroupsOnly')] public function testSearchGroupsOnly($searchTerm, $contacts, $expected, $exactIdMatch, $reachedEnd, $userToGroupMapping, $validEmail): void { $this->config->expects($this->any()) ->method('getAppValue') @@ -593,7 +594,7 @@ class MailPluginTest extends TestCase { $this->instantiatePlugin(); - /** @var \OCP\IUser | \PHPUnit\Framework\MockObject\MockObject */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */ $currentUser = $this->createMock('\OCP\IUser'); $currentUser->expects($this->any()) diff --git a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php index aa7e4c8afd5..ea81b1cbcdc 100644 --- a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php +++ b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -70,7 +71,6 @@ class RemotePluginTest extends TestCase { } /** - * @dataProvider dataGetRemote * * @param string $searchTerm * @param array $contacts @@ -79,6 +79,7 @@ class RemotePluginTest extends TestCase { * @param bool $exactIdMatch * @param bool $reachedEnd */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetRemote')] public function testSearch($searchTerm, array $contacts, $shareeEnumeration, array $expected, $exactIdMatch, $reachedEnd): void { $this->config->expects($this->any()) ->method('getAppValue') @@ -111,12 +112,12 @@ class RemotePluginTest extends TestCase { } /** - * @dataProvider dataTestSplitUserRemote * * @param string $remote * @param string $expectedUser * @param string $expectedUrl */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestSplitUserRemote')] public function testSplitUserRemote($remote, $expectedUser, $expectedUrl): void { $this->instantiatePlugin(); @@ -130,10 +131,9 @@ class RemotePluginTest extends TestCase { } /** - * @dataProvider dataTestSplitUserRemoteError - * * @param string $id */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestSplitUserRemoteError')] public function testSplitUserRemoteError($id): void { $this->expectException(\Exception::class); diff --git a/tests/lib/Collaboration/Collaborators/SearchResultTest.php b/tests/lib/Collaboration/Collaborators/SearchResultTest.php index 7a0afe87e4b..687901c47a6 100644 --- a/tests/lib/Collaboration/Collaborators/SearchResultTest.php +++ b/tests/lib/Collaboration/Collaborators/SearchResultTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -37,10 +38,10 @@ class SearchResultTest extends TestCase { } /** - * @dataProvider dataAddResultSet * @param array $toAdd * @param array $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataAddResultSet')] public function testAddResultSet(array $toAdd, array $expected): void { $result = new SearchResult(); @@ -66,12 +67,12 @@ class SearchResultTest extends TestCase { } /** - * @dataProvider dataHasResult * @param array $toAdd * @param string $type * @param string $id * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataHasResult')] public function testHasResult(array $toAdd, $type, $id, $expected): void { $result = new SearchResult(); diff --git a/tests/lib/Collaboration/Collaborators/SearchTest.php b/tests/lib/Collaboration/Collaborators/SearchTest.php index 146befe966e..ade995ea526 100644 --- a/tests/lib/Collaboration/Collaborators/SearchTest.php +++ b/tests/lib/Collaboration/Collaborators/SearchTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -29,9 +30,7 @@ class SearchTest extends TestCase { $this->search = new Search($this->container); } - /** - * @dataProvider dataSearchSharees - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSearchSharees')] public function testSearch( string $searchTerm, array $shareTypes, diff --git a/tests/lib/Collaboration/Collaborators/UserPluginTest.php b/tests/lib/Collaboration/Collaborators/UserPluginTest.php index 3b342b7938b..cb4949fb86d 100644 --- a/tests/lib/Collaboration/Collaborators/UserPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/UserPluginTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -417,7 +418,6 @@ class UserPluginTest extends TestCase { } /** - * @dataProvider dataGetUsers * * @param string $searchTerm * @param bool $shareWithGroupOnly @@ -430,6 +430,7 @@ class UserPluginTest extends TestCase { * @param bool|IUser $singleUser * @param array $users */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetUsers')] public function testSearch( $searchTerm, $shareWithGroupOnly, @@ -534,11 +535,11 @@ class UserPluginTest extends TestCase { } /** - * @dataProvider takeOutCurrentUserProvider * @param array $users * @param array $expectedUIDs * @param $currentUserId */ + #[\PHPUnit\Framework\Attributes\DataProvider('takeOutCurrentUserProvider')] public function testTakeOutCurrentUser(array $users, array $expectedUIDs, $currentUserId): void { $this->instantiatePlugin(); @@ -716,9 +717,7 @@ class UserPluginTest extends TestCase { ]; } - /** - * @dataProvider dataSearchEnumeration - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSearchEnumeration')] public function testSearchEnumerationLimit($search, $userGroups, $matchingUsers, $result, $mockedSettings): void { $this->mockConfig($mockedSettings); diff --git a/tests/lib/Command/AsyncBusTestCase.php b/tests/lib/Command/AsyncBusTestCase.php index 6aca4d8d6e6..bb47de30b11 100644 --- a/tests/lib/Command/AsyncBusTestCase.php +++ b/tests/lib/Command/AsyncBusTestCase.php @@ -64,7 +64,7 @@ abstract class AsyncBusTestCase extends TestCase { public static $lastCommand; /** - * @var \OCP\Command\IBus + * @var IBus */ private $bus; diff --git a/tests/lib/Command/BackgroundModeTest.php b/tests/lib/Command/BackgroundModeTest.php index 2f874deb78a..ab036ef87ee 100644 --- a/tests/lib/Command/BackgroundModeTest.php +++ b/tests/lib/Command/BackgroundModeTest.php @@ -35,9 +35,7 @@ class BackgroundModeTest extends TestCase { $this->command->setDefinition($inputDefinition); } - /** - * @dataProvider dataModeCommand - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataModeCommand')] public function testModeCommand(string $mode): void { $this->appConfig->expects($this->once()) ->method('setValueString') diff --git a/tests/lib/Command/CronBusTest.php b/tests/lib/Command/CronBusTest.php index 2e5617efb31..c86cdcb1da0 100644 --- a/tests/lib/Command/CronBusTest.php +++ b/tests/lib/Command/CronBusTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -7,6 +8,7 @@ namespace Test\Command; use OC\Command\CronBus; +use OCP\BackgroundJob\IJobList; use Test\BackgroundJob\DummyJobList; /** @@ -14,7 +16,7 @@ use Test\BackgroundJob\DummyJobList; */ class CronBusTest extends AsyncBusTestCase { /** - * @var \OCP\BackgroundJob\IJobList + * @var IJobList */ private $jobList; diff --git a/tests/lib/Command/Integrity/SignAppTest.php b/tests/lib/Command/Integrity/SignAppTest.php index 15f98dba0c0..237afe3a5b5 100644 --- a/tests/lib/Command/Integrity/SignAppTest.php +++ b/tests/lib/Command/Integrity/SignAppTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Command/Integrity/SignCoreTest.php b/tests/lib/Command/Integrity/SignCoreTest.php index efff6da2f95..843084eebd9 100644 --- a/tests/lib/Command/Integrity/SignCoreTest.php +++ b/tests/lib/Command/Integrity/SignCoreTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Comments/CommentTest.php b/tests/lib/Comments/CommentTest.php index 9e28531a045..4a320666c83 100644 --- a/tests/lib/Comments/CommentTest.php +++ b/tests/lib/Comments/CommentTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -14,7 +15,7 @@ use Test\TestCase; class CommentTest extends TestCase { /** - * @throws \OCP\Comments\IllegalIDChangeException + * @throws IllegalIDChangeException */ public function testSettersValidInput(): void { $comment = new Comment(); @@ -73,7 +74,7 @@ class CommentTest extends TestCase { } /** - * @throws \OCP\Comments\IllegalIDChangeException + * @throws IllegalIDChangeException */ public function testResetId(): void { $comment = new Comment(); @@ -95,9 +96,7 @@ class CommentTest extends TestCase { ]; } - /** - * @dataProvider simpleSetterProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('simpleSetterProvider')] public function testSimpleSetterInvalidInput($field, $input): void { $this->expectException(\InvalidArgumentException::class); @@ -120,9 +119,7 @@ class CommentTest extends TestCase { ]; } - /** - * @dataProvider roleSetterProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('roleSetterProvider')] public function testSetRoleInvalidInput($role, $type, $id): void { $this->expectException(\InvalidArgumentException::class); @@ -160,11 +157,11 @@ class CommentTest extends TestCase { /* author: */ 'alice' ], [ - '@foobar and @barfoo you should know, @foo@bar.com is valid' . - ' and so is @bar@foo.org@foobar.io I hope that clarifies everything.' . - ' cc @23452-4333-54353-2342 @yolo!' . - ' however the most important thing to know is that www.croissant.com/@oil is not valid' . - ' and won\'t match anything at all', + '@foobar and @barfoo you should know, @foo@bar.com is valid' + . ' and so is @bar@foo.org@foobar.io I hope that clarifies everything.' + . ' cc @23452-4333-54353-2342 @yolo!' + . ' however the most important thing to know is that www.croissant.com/@oil is not valid' + . ' and won\'t match anything at all', [ ['type' => 'user', 'id' => 'bar@foo.org@foobar.io'], ['type' => 'user', 'id' => '23452-4333-54353-2342'], @@ -208,12 +205,12 @@ class CommentTest extends TestCase { } /** - * @dataProvider mentionsProvider * * @param string $message * @param array $expectedMentions * @param ?string $author */ + #[\PHPUnit\Framework\Attributes\DataProvider('mentionsProvider')] public function testMentions(string $message, array $expectedMentions, ?string $author = null): void { $comment = new Comment(); $comment->setMessage($message); diff --git a/tests/lib/Comments/FakeFactory.php b/tests/lib/Comments/FakeFactory.php index 19d8b58ae01..0c3241078d7 100644 --- a/tests/lib/Comments/FakeFactory.php +++ b/tests/lib/Comments/FakeFactory.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Comments/FakeManager.php b/tests/lib/Comments/FakeManager.php index 155bbc59dce..64a25ef46c8 100644 --- a/tests/lib/Comments/FakeManager.php +++ b/tests/lib/Comments/FakeManager.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Comments/ManagerTest.php b/tests/lib/Comments/ManagerTest.php index 5d03bb06521..bd991a5692a 100644 --- a/tests/lib/Comments/ManagerTest.php +++ b/tests/lib/Comments/ManagerTest.php @@ -376,9 +376,7 @@ class ManagerTest extends TestCase { ], $amount); } - /** - * @dataProvider dataGetForObjectSince - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetForObjectSince')] public function testGetForObjectSince(?int $lastKnown, string $order, int $limit, int $resultFrom, int $resultTo): void { $ids = []; $ids[] = $this->addDatabaseEntry(0, 0); @@ -424,9 +422,7 @@ class ManagerTest extends TestCase { ]; } - /** - * @dataProvider invalidCreateArgsProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('invalidCreateArgsProvider')] public function testCreateCommentInvalidArguments(string|int $aType, string|int $aId, string|int $oType, string|int $oId): void { $this->expectException(\InvalidArgumentException::class); @@ -471,9 +467,7 @@ class ManagerTest extends TestCase { $manager->get($id); } - /** - * @dataProvider providerTestSave - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerTestSave')] public function testSave(string $message, string $actorId, string $verb, ?string $parentId, ?string $id = ''): IComment { $manager = $this->getManager(); $comment = new Comment(); @@ -613,9 +607,7 @@ class ManagerTest extends TestCase { ]; } - /** - * @dataProvider invalidActorArgsProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('invalidActorArgsProvider')] public function testDeleteReferencesOfActorInvalidInput(string|int $type, string|int $id): void { $this->expectException(\InvalidArgumentException::class); @@ -680,9 +672,7 @@ class ManagerTest extends TestCase { ]; } - /** - * @dataProvider invalidObjectArgsProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('invalidObjectArgsProvider')] public function testDeleteCommentsAtObjectInvalidInput(string|int $type, string|int $id): void { $this->expectException(\InvalidArgumentException::class); @@ -1006,9 +996,7 @@ class ManagerTest extends TestCase { } } - /** - * @dataProvider providerTestReactionAddAndDelete - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerTestReactionAddAndDelete')] public function testReactionAddAndDelete(array $comments, array $reactionsExpected): void { $this->skipIfNotSupport4ByteUTF(); $manager = $this->getManager(); @@ -1093,9 +1081,7 @@ class ManagerTest extends TestCase { return $comments; } - /** - * @dataProvider providerTestRetrieveAllReactions - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerTestRetrieveAllReactions')] public function testRetrieveAllReactions(array $comments, array $expected): void { $this->skipIfNotSupport4ByteUTF(); $manager = $this->getManager(); @@ -2357,9 +2343,7 @@ class ManagerTest extends TestCase { ]; } - /** - * @dataProvider providerTestRetrieveAllReactionsWithSpecificReaction - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerTestRetrieveAllReactionsWithSpecificReaction')] public function testRetrieveAllReactionsWithSpecificReaction(array $comments, string $reaction, array $expected): void { $this->skipIfNotSupport4ByteUTF(); $manager = $this->getManager(); @@ -2412,9 +2396,7 @@ class ManagerTest extends TestCase { ]; } - /** - * @dataProvider providerTestGetReactionComment - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerTestGetReactionComment')] public function testGetReactionComment(array $comments, array $expected, bool $notFound): void { $this->skipIfNotSupport4ByteUTF(); $manager = $this->getManager(); @@ -2481,9 +2463,7 @@ class ManagerTest extends TestCase { ]; } - /** - * @dataProvider providerTestReactionMessageSize - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerTestReactionMessageSize')] public function testReactionMessageSize(string $reactionString, bool $valid): void { $this->skipIfNotSupport4ByteUTF(); if (!$valid) { @@ -2512,9 +2492,7 @@ class ManagerTest extends TestCase { ]; } - /** - * @dataProvider providerTestReactionsSummarizeOrdered - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerTestReactionsSummarizeOrdered')] public function testReactionsSummarizeOrdered(array $comments, array $expected, bool $isFullMatch): void { $this->skipIfNotSupport4ByteUTF(); $manager = $this->getManager(); diff --git a/tests/lib/Config/UserConfigTest.php b/tests/lib/Config/UserConfigTest.php index e27e831f425..2c8222576c4 100644 --- a/tests/lib/Config/UserConfigTest.php +++ b/tests/lib/Config/UserConfigTest.php @@ -36,10 +36,10 @@ class UserConfigTest extends TestCase { /** * @var array<string, array<string, array<array<string, string, int, bool, bool>>> [userId => [appId => prefKey, prefValue, valueType, lazy, sensitive]]] */ - private array $basePreferences = - [ - 'user1' => - [ + private array $basePreferences + = [ + 'user1' + => [ 'app1' => [ 'key1' => ['key1', 'value1'], 'key22' => ['key22', '31'], @@ -98,8 +98,8 @@ class UserConfigTest extends TestCase { 'key5' => ['key5', true, ValueType::BOOL, true], ] ], - 'user2' => - [ + 'user2' + => [ 'app1' => [ '1' => ['1', 'value1'], '2' => ['2', 'value2', ValueType::STRING, true, UserConfig::FLAG_SENSITIVE], @@ -121,8 +121,8 @@ class UserConfigTest extends TestCase { 'key1' => ['key1', 'value1', ValueType::STRING, true, 0, true] ] ], - 'user3' => - [ + 'user3' + => [ 'app2' => [ 'key2' => ['key2', 'value2c', ValueType::MIXED, false, 0, true], 'key3' => ['key3', 'value3', ValueType::STRING, true, ], @@ -138,8 +138,8 @@ class UserConfigTest extends TestCase { 'key3' => ['key3', 'value3', ValueType::STRING, true] ] ], - 'user4' => - [ + 'user4' + => [ 'app2' => [ 'key1' => ['key1', 'value1'], 'key2' => ['key2', 'value2A', ValueType::MIXED, false, 0, true], @@ -153,8 +153,8 @@ class UserConfigTest extends TestCase { 'key1' => ['key1', 123, ValueType::INT, true, 0, true] ] ], - 'user5' => - [ + 'user5' + => [ 'app1' => [ 'key1' => ['key1', 'value1'] ], @@ -348,9 +348,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerHasKey - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerHasKey')] public function testHasKey(string $userId, string $appId, string $key, ?bool $lazy, bool $result): void { $userConfig = $this->generateUserConfig(); $this->assertEquals($result, $userConfig->hasKey($userId, $appId, $key, $lazy)); @@ -375,9 +373,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerIsSensitive - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerIsSensitive')] public function testIsSensitive( string $userId, string $appId, @@ -406,9 +402,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerIsLazy - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerIsLazy')] public function testIsLazy( string $userId, string $appId, @@ -541,9 +535,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValues - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValues')] public function testGetValues( string $userId, string $appId, @@ -642,9 +634,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetAllValues - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAllValues')] public function testGetAllValues( string $userId, bool $filtered, @@ -686,9 +676,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSearchValuesByApps - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSearchValuesByApps')] public function testSearchValuesByApps( string $userId, string $key, @@ -736,9 +724,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSearchValuesByUsers - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSearchValuesByUsers')] public function testSearchValuesByUsers( string $app, string $key, @@ -760,9 +746,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSearchValuesByValueString - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSearchValuesByValueString')] public function testSearchUsersByValueString( string $app, string $key, @@ -782,9 +766,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSearchValuesByValueInt - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSearchValuesByValueInt')] public function testSearchUsersByValueInt( string $app, string $key, @@ -802,9 +784,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSearchValuesByValues - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSearchValuesByValues')] public function testSearchUsersByValues( string $app, string $key, @@ -822,9 +802,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSearchValuesByValueBool - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSearchValuesByValueBool')] public function testSearchUsersByValueBool( string $app, string $key, @@ -903,9 +881,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValueMixed - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueMixed')] public function testGetValueMixed( ?array $preload, string $userId, @@ -919,9 +895,7 @@ class UserConfigTest extends TestCase { $this->assertEquals($result, $userConfig->getValueMixed($userId, $app, $key, $default, $lazy)); } - /** - * @dataProvider providerGetValueMixed - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueMixed')] public function testGetValueString( ?array $preload, string $userId, @@ -961,9 +935,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValueInt - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueInt')] public function testGetValueInt( ?array $preload, string $userId, @@ -1002,9 +974,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValueFloat - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueFloat')] public function testGetValueFloat( ?array $preload, string $userId, @@ -1063,9 +1033,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValueBool - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueBool')] public function testGetValueBool( ?array $preload, string $userId, @@ -1100,9 +1068,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValueArray - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueArray')] public function testGetValueArray( ?array $preload, string $userId, @@ -1156,9 +1122,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValueType - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueType')] public function testGetValueType( ?array $preload, string $userId, @@ -1215,9 +1179,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSetValueMixed - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetValueMixed')] public function testSetValueMixed( ?array $preload, string $userId, @@ -1298,9 +1260,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSetValueString - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetValueString')] public function testSetValueString( ?array $preload, string $userId, @@ -1361,9 +1321,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSetValueInt - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetValueInt')] public function testSetValueInt( ?array $preload, string $userId, @@ -1424,9 +1382,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSetValueFloat - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetValueFloat')] public function testSetValueFloat( ?array $preload, string $userId, @@ -1488,9 +1444,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSetValueArray - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetValueArray')] public function testSetValueArray( ?array $preload, string $userId, @@ -1534,9 +1488,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerUpdateSensitive - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerUpdateSensitive')] public function testUpdateSensitive( ?array $preload, string $userId, @@ -1563,8 +1515,8 @@ class UserConfigTest extends TestCase { $this->assertEquals($sensitive, $userConfig->isSensitive($userId, $app, $key)); if ($sensitive) { $this->assertEquals(true, str_starts_with( - $userConfig->statusCache()['fastCache'][$userId][$app][$key] ?? - $userConfig->statusCache()['lazyCache'][$userId][$app][$key], + $userConfig->statusCache()['fastCache'][$userId][$app][$key] + ?? $userConfig->statusCache()['lazyCache'][$userId][$app][$key], '$UserConfigEncryption$') ); } @@ -1575,9 +1527,7 @@ class UserConfigTest extends TestCase { return [[true], [false]]; } - /** - * @dataProvider providerUpdateGlobalSensitive - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerUpdateGlobalSensitive')] public function testUpdateGlobalSensitive(bool $sensitive): void { $userConfig = $this->generateUserConfig($preload ?? []); $app = 'app2'; @@ -1594,8 +1544,8 @@ class UserConfigTest extends TestCase { $userConfig->getValueString($userId, $app, $key); // cache loading for userId $this->assertEquals( !$sensitive, str_starts_with( - $userConfig->statusCache()['fastCache'][$userId][$app][$key] ?? - $userConfig->statusCache()['lazyCache'][$userId][$app][$key], + $userConfig->statusCache()['fastCache'][$userId][$app][$key] + ?? $userConfig->statusCache()['lazyCache'][$userId][$app][$key], '$UserConfigEncryption$' ) ); @@ -1608,8 +1558,8 @@ class UserConfigTest extends TestCase { $this->assertEquals($sensitive, $userConfig->isSensitive($userId, $app, $key)); // should only work if updateGlobalSensitive drop cache $this->assertEquals($sensitive, str_starts_with( - $userConfig->statusCache()['fastCache'][$userId][$app][$key] ?? - $userConfig->statusCache()['lazyCache'][$userId][$app][$key], + $userConfig->statusCache()['fastCache'][$userId][$app][$key] + ?? $userConfig->statusCache()['lazyCache'][$userId][$app][$key], '$UserConfigEncryption$') ); } @@ -1624,9 +1574,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerUpdateLazy - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerUpdateLazy')] public function testUpdateLazy( ?array $preload, string $userId, @@ -1658,9 +1606,7 @@ class UserConfigTest extends TestCase { return [[true], [false]]; } - /** - * @dataProvider providerUpdateGlobalLazy - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerUpdateGlobalLazy')] public function testUpdateGlobalLazy(bool $lazy): void { $userConfig = $this->generateUserConfig($preload ?? []); $app = 'app2'; @@ -1728,9 +1674,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetDetails - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetDetails')] public function testGetDetails(string $userId, string $app, string $key, array $result): void { $userConfig = $this->generateUserConfig($preload ?? []); $this->assertEqualsCanonicalizing($result, $userConfig->getDetails($userId, $app, $key)); @@ -1748,9 +1692,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerDeletePreference - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerDeletePreference')] public function testDeletePreference( ?array $preload, string $userId, @@ -1779,9 +1721,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerDeleteKey - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerDeleteKey')] public function testDeleteKey( ?array $preload, string $app, diff --git a/tests/lib/ConfigTest.php b/tests/lib/ConfigTest.php index 89135e0cffd..b2a52dbd6a4 100644 --- a/tests/lib/ConfigTest.php +++ b/tests/lib/ConfigTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -96,8 +97,8 @@ class ConfigTest extends TestCase { $this->assertSame('moo', $config->getValue('foo')); $content = file_get_contents($this->configFile); - $expected = "<?php\n\$CONFIG = array (\n 'foo' => 'moo',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " . - " 1 => 'Guinness',\n 2 => 'Kรถlsch',\n ),\n 'alcohol_free' => false,\n);\n"; + $expected = "<?php\n\$CONFIG = array (\n 'foo' => 'moo',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " + . " 1 => 'Guinness',\n 2 => 'Kรถlsch',\n ),\n 'alcohol_free' => false,\n);\n"; $this->assertEquals($expected, $content); $config->setValue('bar', 'red'); @@ -107,9 +108,9 @@ class ConfigTest extends TestCase { $content = file_get_contents($this->configFile); - $expected = "<?php\n\$CONFIG = array (\n 'foo' => 'moo',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " . - " 1 => 'Guinness',\n 2 => 'Kรถlsch',\n ),\n 'alcohol_free' => false,\n 'bar' => 'red',\n 'apps' => \n " . - " array (\n 0 => 'files',\n 1 => 'gallery',\n ),\n);\n"; + $expected = "<?php\n\$CONFIG = array (\n 'foo' => 'moo',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " + . " 1 => 'Guinness',\n 2 => 'Kรถlsch',\n ),\n 'alcohol_free' => false,\n 'bar' => 'red',\n 'apps' => \n " + . " array (\n 0 => 'files',\n 1 => 'gallery',\n ),\n);\n"; $this->assertEquals($expected, $content); } @@ -138,8 +139,8 @@ class ConfigTest extends TestCase { $this->assertSame(null, $config->getValue('not_exists')); $content = file_get_contents($this->configFile); - $expected = "<?php\n\$CONFIG = array (\n 'foo' => 'moo',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " . - " 1 => 'Guinness',\n 2 => 'Kรถlsch',\n ),\n);\n"; + $expected = "<?php\n\$CONFIG = array (\n 'foo' => 'moo',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " + . " 1 => 'Guinness',\n 2 => 'Kรถlsch',\n ),\n);\n"; $this->assertEquals($expected, $content); } @@ -149,8 +150,8 @@ class ConfigTest extends TestCase { $this->assertSame('this_was_clearly_not_set_before', $config->getValue('foo', 'this_was_clearly_not_set_before')); $content = file_get_contents($this->configFile); - $expected = "<?php\n\$CONFIG = array (\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " . - " 1 => 'Guinness',\n 2 => 'Kรถlsch',\n ),\n 'alcohol_free' => false,\n);\n"; + $expected = "<?php\n\$CONFIG = array (\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " + . " 1 => 'Guinness',\n 2 => 'Kรถlsch',\n ),\n 'alcohol_free' => false,\n);\n"; $this->assertEquals($expected, $content); } @@ -169,9 +170,9 @@ class ConfigTest extends TestCase { // Write a new value to the config $config->setValue('CoolWebsites', ['demo.owncloud.org', 'owncloud.org', 'owncloud.com']); - $expected = "<?php\n\$CONFIG = array (\n 'foo' => 'bar',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " . - " 1 => 'Guinness',\n 2 => 'Kรถlsch',\n ),\n 'alcohol_free' => false,\n 'php53' => 'totallyOutdated',\n 'CoolWebsites' => \n array (\n " . - " 0 => 'demo.owncloud.org',\n 1 => 'owncloud.org',\n 2 => 'owncloud.com',\n ),\n);\n"; + $expected = "<?php\n\$CONFIG = array (\n 'foo' => 'bar',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " + . " 1 => 'Guinness',\n 2 => 'Kรถlsch',\n ),\n 'alcohol_free' => false,\n 'php53' => 'totallyOutdated',\n 'CoolWebsites' => \n array (\n " + . " 0 => 'demo.owncloud.org',\n 1 => 'owncloud.org',\n 2 => 'owncloud.com',\n ),\n);\n"; $this->assertEquals($expected, file_get_contents($this->configFile)); // Cleanup diff --git a/tests/lib/Contacts/ContactsMenu/Providers/LocalTimeProviderTest.php b/tests/lib/Contacts/ContactsMenu/Providers/LocalTimeProviderTest.php index 198ec6c672e..cc53c0bcfcf 100644 --- a/tests/lib/Contacts/ContactsMenu/Providers/LocalTimeProviderTest.php +++ b/tests/lib/Contacts/ContactsMenu/Providers/LocalTimeProviderTest.php @@ -110,9 +110,7 @@ class LocalTimeProviderTest extends TestCase { ]; } - /** - * @dataProvider dataTestProcess - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestProcess')] public function testProcess(bool $hasCurrentUser, ?string $currentUserTZ, ?string $targetUserTZ, string $expected): void { $entry = $this->createMock(IEntry::class); $entry->expects($this->once()) diff --git a/tests/lib/ContactsManagerTest.php b/tests/lib/ContactsManagerTest.php index 5f7e65312f2..d2d46ce43b4 100644 --- a/tests/lib/ContactsManagerTest.php +++ b/tests/lib/ContactsManagerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -64,9 +65,7 @@ class ContactsManagerTest extends \Test\TestCase { ]; } - /** - * @dataProvider searchProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('searchProvider')] public function testSearch($search1, $search2, $expectedResult): void { /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */ $addressbook1 = $this->getMockBuilder('\OCP\IAddressBookEnabled') @@ -108,9 +107,7 @@ class ContactsManagerTest extends \Test\TestCase { $this->assertEquals($expectedResult, $result); } - /** - * @dataProvider searchProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('searchProvider')] public function testSearchDisabledAb($search1): void { /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBookEnabled $addressbook */ $addressbook1 = $this->getMockBuilder('\OCP\IAddressBookEnabled') diff --git a/tests/lib/DB/AdapterTest.php b/tests/lib/DB/AdapterTest.php index bf95ad26a97..394428337f1 100644 --- a/tests/lib/DB/AdapterTest.php +++ b/tests/lib/DB/AdapterTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/DB/ConnectionFactoryTest.php b/tests/lib/DB/ConnectionFactoryTest.php index 31dd8037964..d09a83ca856 100644 --- a/tests/lib/DB/ConnectionFactoryTest.php +++ b/tests/lib/DB/ConnectionFactoryTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -27,10 +28,10 @@ class ConnectionFactoryTest extends TestCase { } /** - * @dataProvider splitHostFromPortAndSocketData * @param string $host * @param array $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('splitHostFromPortAndSocketData')] public function testSplitHostFromPortAndSocket($host, array $expected): void { /** @var SystemConfig $config */ $config = $this->createMock(SystemConfig::class); diff --git a/tests/lib/DB/Exception/DbalExceptionTest.php b/tests/lib/DB/Exception/DbalExceptionTest.php index c37e65aea0e..eac74291749 100644 --- a/tests/lib/DB/Exception/DbalExceptionTest.php +++ b/tests/lib/DB/Exception/DbalExceptionTest.php @@ -35,10 +35,10 @@ class DbalExceptionTest extends \Test\TestCase { } /** - * @dataProvider dataDriverException * @param string $class * @param int $reason */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataDriverException')] public function testDriverException(string $class, int $reason): void { $result = DbalException::wrap(new $class($this->driverException, null)); $this->assertSame($reason, $result->getReason()); diff --git a/tests/lib/DB/MigrationsTest.php b/tests/lib/DB/MigrationsTest.php index 6a730d5290c..2b39b26d852 100644 --- a/tests/lib/DB/MigrationsTest.php +++ b/tests/lib/DB/MigrationsTest.php @@ -185,10 +185,10 @@ class MigrationsTest extends \Test\TestCase { } /** - * @dataProvider dataGetMigration * @param string $alias * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetMigration')] public function testGetMigration($alias, $expected): void { $this->migrationService = $this->getMockBuilder(MigrationService::class) ->onlyMethods(['getMigratedVersions', 'findMigrations']) @@ -844,11 +844,10 @@ class MigrationsTest extends \Test\TestCase { 'class' => 'OCP\\Migration\\Attributes\\CreateTable', 'table' => 'new_table', 'description' => 'Table is used to store things, but also to get more things', - 'notes' => - [ - 'this is a notice', - 'and another one, if really needed' - ], + 'notes' => [ + 'this is a notice', + 'and another one, if really needed' + ], 'columns' => [] ], [ diff --git a/tests/lib/DB/MigratorTest.php b/tests/lib/DB/MigratorTest.php index 26b0e000cf6..9d8ee6791a9 100644 --- a/tests/lib/DB/MigratorTest.php +++ b/tests/lib/DB/MigratorTest.php @@ -279,13 +279,13 @@ class MigratorTest extends \Test\TestCase { } /** - * @dataProvider dataNotNullEmptyValuesFailOracle * * @param int $parameterType * @param bool|int|string $value * @param string $columnType * @param bool $oracleThrows */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNotNullEmptyValuesFailOracle')] public function testNotNullEmptyValuesFailOracle(int $parameterType, $value, string $columnType, bool $oracleThrows): void { $startSchema = new Schema([], [], $this->getSchemaConfig()); $table = $startSchema->createTable($this->tableName); diff --git a/tests/lib/DB/OCPostgreSqlPlatformTest.php b/tests/lib/DB/OCPostgreSqlPlatformTest.php index bea3adf29a4..af17b01fc13 100644 --- a/tests/lib/DB/OCPostgreSqlPlatformTest.php +++ b/tests/lib/DB/OCPostgreSqlPlatformTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 ownCloud, Inc. diff --git a/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php b/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php index 87fc4273dde..153993f396e 100644 --- a/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php +++ b/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -19,7 +20,7 @@ use Test\TestCase; * @group DB */ class ExpressionBuilderDBTest extends TestCase { - /** @var \Doctrine\DBAL\Connection|\OCP\IDBConnection */ + /** @var \Doctrine\DBAL\Connection|IDBConnection */ protected $connection; protected $schemaSetup = false; @@ -47,12 +48,12 @@ class ExpressionBuilderDBTest extends TestCase { } /** - * @dataProvider likeProvider * * @param string $param1 * @param string $param2 * @param boolean $match */ + #[\PHPUnit\Framework\Attributes\DataProvider('likeProvider')] public function testLike($param1, $param2, $match): void { $query = $this->connection->getQueryBuilder(); @@ -84,12 +85,12 @@ class ExpressionBuilderDBTest extends TestCase { } /** - * @dataProvider ilikeProvider * * @param string $param1 * @param string $param2 * @param boolean $match */ + #[\PHPUnit\Framework\Attributes\DataProvider('ilikeProvider')] public function testILike($param1, $param2, $match): void { $query = $this->connection->getQueryBuilder(); diff --git a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php index aa6428b0ca8..1f84ebfbec1 100644 --- a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -29,7 +30,7 @@ class ExpressionBuilderTest extends TestCase { /** @var DoctrineExpressionBuilder */ protected $doctrineExpressionBuilder; - /** @var \OCP\IDBConnection */ + /** @var IDBConnection */ protected $connection; /** @var \Doctrine\DBAL\Connection */ @@ -66,7 +67,6 @@ class ExpressionBuilderTest extends TestCase { } /** - * @dataProvider dataComparison * * @param string $comparison * @param mixed $input1 @@ -74,6 +74,7 @@ class ExpressionBuilderTest extends TestCase { * @param mixed $input2 * @param bool $isInput2Literal */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataComparison')] public function testComparison($comparison, $input1, $isInput1Literal, $input2, $isInput2Literal): void { [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); @@ -94,13 +95,13 @@ class ExpressionBuilderTest extends TestCase { } /** - * @dataProvider dataComparisons * * @param mixed $input1 * @param bool $isInput1Literal * @param mixed $input2 * @param bool $isInput2Literal */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataComparisons')] public function testEquals($input1, $isInput1Literal, $input2, $isInput2Literal): void { [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); @@ -112,13 +113,13 @@ class ExpressionBuilderTest extends TestCase { } /** - * @dataProvider dataComparisons * * @param mixed $input1 * @param bool $isInput1Literal * @param mixed $input2 * @param bool $isInput2Literal */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataComparisons')] public function testNotEquals($input1, $isInput1Literal, $input2, $isInput2Literal): void { [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); @@ -130,13 +131,13 @@ class ExpressionBuilderTest extends TestCase { } /** - * @dataProvider dataComparisons * * @param mixed $input1 * @param bool $isInput1Literal * @param mixed $input2 * @param bool $isInput2Literal */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataComparisons')] public function testLowerThan($input1, $isInput1Literal, $input2, $isInput2Literal): void { [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); @@ -148,13 +149,13 @@ class ExpressionBuilderTest extends TestCase { } /** - * @dataProvider dataComparisons * * @param mixed $input1 * @param bool $isInput1Literal * @param mixed $input2 * @param bool $isInput2Literal */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataComparisons')] public function testLowerThanEquals($input1, $isInput1Literal, $input2, $isInput2Literal): void { [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); @@ -166,13 +167,13 @@ class ExpressionBuilderTest extends TestCase { } /** - * @dataProvider dataComparisons * * @param mixed $input1 * @param bool $isInput1Literal * @param mixed $input2 * @param bool $isInput2Literal */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataComparisons')] public function testGreaterThan($input1, $isInput1Literal, $input2, $isInput2Literal): void { [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); @@ -184,13 +185,13 @@ class ExpressionBuilderTest extends TestCase { } /** - * @dataProvider dataComparisons * * @param mixed $input1 * @param bool $isInput1Literal * @param mixed $input2 * @param bool $isInput2Literal */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataComparisons')] public function testGreaterThanEquals($input1, $isInput1Literal, $input2, $isInput2Literal): void { [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); @@ -223,11 +224,11 @@ class ExpressionBuilderTest extends TestCase { } /** - * @dataProvider dataLike * * @param mixed $input * @param bool $isLiteral */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataLike')] public function testLike($input, $isLiteral): void { [$doctrineInput, $ocInput] = $this->helpWithLiteral($input, $isLiteral); @@ -238,11 +239,11 @@ class ExpressionBuilderTest extends TestCase { } /** - * @dataProvider dataLike * * @param mixed $input * @param bool $isLiteral */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataLike')] public function testNotLike($input, $isLiteral): void { [$doctrineInput, $ocInput] = $this->helpWithLiteral($input, $isLiteral); @@ -262,11 +263,11 @@ class ExpressionBuilderTest extends TestCase { } /** - * @dataProvider dataIn * * @param mixed $input * @param bool $isLiteral */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataIn')] public function testIn($input, $isLiteral): void { [$doctrineInput, $ocInput] = $this->helpWithLiteral($input, $isLiteral); @@ -277,11 +278,11 @@ class ExpressionBuilderTest extends TestCase { } /** - * @dataProvider dataIn * * @param mixed $input * @param bool $isLiteral */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataIn')] public function testNotIn($input, $isLiteral): void { [$doctrineInput, $ocInput] = $this->helpWithLiteral($input, $isLiteral); @@ -331,11 +332,11 @@ class ExpressionBuilderTest extends TestCase { } /** - * @dataProvider dataLiteral * * @param mixed $input * @param string|null $type */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataLiteral')] public function testLiteral($input, $type): void { /** @var \OC\DB\QueryBuilder\Literal $actual */ $actual = $this->expressionBuilder->literal($input, $type); @@ -375,13 +376,13 @@ class ExpressionBuilderTest extends TestCase { } /** - * @dataProvider dataClobComparisons * @param string $function * @param mixed $value * @param mixed $type * @param bool $compareKeyToValue * @param int $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataClobComparisons')] public function testClobComparisons($function, $value, $type, $compareKeyToValue, $expected): void { $appId = $this->getUniqueID('testing'); $this->createConfig($appId, 1, 4); diff --git a/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php b/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php index 6dc57879dd7..fc20af8a841 100644 --- a/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only @@ -20,7 +21,7 @@ use Test\TestCase; * @package Test\DB\QueryBuilder */ class FunctionBuilderTest extends TestCase { - /** @var \Doctrine\DBAL\Connection|\OCP\IDBConnection */ + /** @var \Doctrine\DBAL\Connection|IDBConnection */ protected $connection; protected function setUp(): void { @@ -29,9 +30,7 @@ class FunctionBuilderTest extends TestCase { $this->connection = Server::get(IDBConnection::class); } - /** - * @dataProvider providerTestConcatString - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerTestConcatString')] public function testConcatString($closure): void { $query = $this->connection->getQueryBuilder(); [$real, $arguments, $return] = $closure($query); @@ -53,36 +52,36 @@ class FunctionBuilderTest extends TestCase { public static function providerTestConcatString(): array { return [ - '1 column: string param unicode' => - [function ($q) { + '1 column: string param unicode' + => [function ($q) { return [false, [$q->createNamedParameter('๐')], '๐']; }], - '2 columns: string param and string param' => - [function ($q) { + '2 columns: string param and string param' + => [function ($q) { return [false, [$q->createNamedParameter('foo'), $q->createNamedParameter('bar')], 'foobar']; }], - '2 columns: string param and int literal' => - [function ($q) { + '2 columns: string param and int literal' + => [function ($q) { return [false, [$q->createNamedParameter('foo'), $q->expr()->literal(1)], 'foo1']; }], - '2 columns: string param and string literal' => - [function ($q) { + '2 columns: string param and string literal' + => [function ($q) { return [false, [$q->createNamedParameter('foo'), $q->expr()->literal('bar')], 'foobar']; }], - '2 columns: string real and int literal' => - [function ($q) { + '2 columns: string real and int literal' + => [function ($q) { return [true, ['configkey', $q->expr()->literal(2)], '12']; }], - '4 columns: string literal' => - [function ($q) { + '4 columns: string literal' + => [function ($q) { return [false, [$q->expr()->literal('foo'), $q->expr()->literal('bar'), $q->expr()->literal('foo'), $q->expr()->literal('bar')], 'foobarfoobar']; }], - '4 columns: int literal' => - [function ($q) { + '4 columns: int literal' + => [function ($q) { return [false, [$q->expr()->literal(1), $q->expr()->literal(2), $q->expr()->literal(3), $q->expr()->literal(4)], '1234']; }], - '5 columns: string param with special chars used in the function' => - [function ($q) { + '5 columns: string param with special chars used in the function' + => [function ($q) { return [false, [$q->createNamedParameter('b'), $q->createNamedParameter("'"), $q->createNamedParameter('||'), $q->createNamedParameter(','), $q->createNamedParameter('a')], "b'||,a"]; }], ]; @@ -334,9 +333,7 @@ class FunctionBuilderTest extends TestCase { ]; } - /** - * @dataProvider octetLengthProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('octetLengthProvider')] public function testOctetLength(string $str, int $bytes): void { $query = $this->connection->getQueryBuilder(); @@ -359,9 +356,7 @@ class FunctionBuilderTest extends TestCase { ]; } - /** - * @dataProvider charLengthProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('charLengthProvider')] public function testCharLength(string $str, int $bytes): void { $query = $this->connection->getQueryBuilder(); diff --git a/tests/lib/DB/QueryBuilder/Partitioned/JoinConditionTest.php b/tests/lib/DB/QueryBuilder/Partitioned/JoinConditionTest.php index 3d34ad389bc..8f84d6a0d2c 100644 --- a/tests/lib/DB/QueryBuilder/Partitioned/JoinConditionTest.php +++ b/tests/lib/DB/QueryBuilder/Partitioned/JoinConditionTest.php @@ -41,9 +41,7 @@ class JoinConditionTest extends TestCase { ); } - /** - * @dataProvider platformProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('platformProvider')] public function testParseCondition(string $platform): void { $query = $this->getBuilder($platform); $param1 = $query->createNamedParameter('files'); @@ -63,9 +61,7 @@ class JoinConditionTest extends TestCase { ], $parsed->toConditions); } - /** - * @dataProvider platformProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('platformProvider')] public function testParseCastCondition(string $platform): void { $query = $this->getBuilder($platform); diff --git a/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php b/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php index 697b3ab92c9..f99adc73aa8 100644 --- a/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php index 05913b87e4e..990191a9ff5 100644 --- a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -99,11 +100,11 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataFirstResult * * @param int|null $firstResult * @param array $expectedSet */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFirstResult')] public function testFirstResult($firstResult, $expectedSet): void { $this->deleteTestingRows(); $this->createTestingRows(); @@ -136,11 +137,11 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataMaxResults * * @param int $maxResult * @param array $expectedSet */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataMaxResults')] public function testMaxResults($maxResult, $expectedSet): void { $this->deleteTestingRows(); $this->createTestingRows(); @@ -188,12 +189,12 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataSelect * * @param array $selectArguments * @param array $expected * @param string $expectedLiteral */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSelect')] public function testSelect($selectArguments, $expected, $expectedLiteral = ''): void { $this->deleteTestingRows(); $this->createTestingRows(); @@ -241,12 +242,12 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataSelectAlias * * @param mixed $select * @param array $alias * @param array $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSelectAlias')] public function testSelectAlias($select, $alias, $expected): void { $this->deleteTestingRows(); $this->createTestingRows(); @@ -365,12 +366,12 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataAddSelect * * @param array $selectArguments * @param array $expected * @param string $expectedLiteral */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataAddSelect')] public function testAddSelect($selectArguments, $expected, $expectedLiteral = ''): void { $this->deleteTestingRows(); $this->createTestingRows(); @@ -417,13 +418,13 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataDelete * * @param string $tableName * @param string $tableAlias * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataDelete')] public function testDelete($tableName, $tableAlias, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->delete($tableName, $tableAlias); @@ -446,13 +447,13 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataUpdate * * @param string $tableName * @param string $tableAlias * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataUpdate')] public function testUpdate($tableName, $tableAlias, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->update($tableName, $tableAlias); @@ -474,12 +475,12 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataInsert * * @param string $tableName * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataInsert')] public function testInsert($tableName, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->insert($tableName); @@ -516,7 +517,6 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataFrom * * @param string|IQueryFunction $table1Name * @param string $table1Alias @@ -525,6 +525,7 @@ class QueryBuilderTest extends \Test\TestCase { * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFrom')] public function testFrom($table1Name, $table1Alias, $table2Name, $table2Alias, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->from($table1Name, $table1Alias); if ($table2Name !== null) { @@ -564,7 +565,6 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataJoin * * @param string $fromAlias * @param string $tableName @@ -573,6 +573,7 @@ class QueryBuilderTest extends \Test\TestCase { * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataJoin')] public function testJoin($fromAlias, $tableName, $tableAlias, $condition, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->from('data1', 'd1'); $this->queryBuilder->join( @@ -594,7 +595,6 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataJoin * * @param string $fromAlias * @param string $tableName @@ -603,6 +603,7 @@ class QueryBuilderTest extends \Test\TestCase { * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataJoin')] public function testInnerJoin($fromAlias, $tableName, $tableAlias, $condition, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->from('data1', 'd1'); $this->queryBuilder->innerJoin( @@ -644,7 +645,6 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataLeftJoin * * @param string $fromAlias * @param string $tableName @@ -653,6 +653,7 @@ class QueryBuilderTest extends \Test\TestCase { * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataLeftJoin')] public function testLeftJoin($fromAlias, $tableName, $tableAlias, $condition, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->from('data1', 'd1'); $this->queryBuilder->leftJoin( @@ -694,7 +695,6 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataRightJoin * * @param string $fromAlias * @param string $tableName @@ -703,6 +703,7 @@ class QueryBuilderTest extends \Test\TestCase { * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataRightJoin')] public function testRightJoin($fromAlias, $tableName, $tableAlias, $condition, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->from('data1', 'd1'); $this->queryBuilder->rightJoin( @@ -733,7 +734,6 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataSet * * @param string $partOne1 * @param string $partOne2 @@ -742,6 +742,7 @@ class QueryBuilderTest extends \Test\TestCase { * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSet')] public function testSet($partOne1, $partOne2, $partTwo1, $partTwo2, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->update('data'); $this->queryBuilder->set($partOne1, $partOne2); @@ -768,12 +769,12 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataWhere * * @param array $whereArguments * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataWhere')] public function testWhere($whereArguments, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->select('column'); call_user_func_array( @@ -793,12 +794,12 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataWhere * * @param array $whereArguments * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataWhere')] public function testAndWhere($whereArguments, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->select('column'); call_user_func_array( @@ -825,12 +826,12 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataOrWhere * * @param array $whereArguments * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataOrWhere')] public function testOrWhere($whereArguments, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->select('column'); call_user_func_array( @@ -857,12 +858,12 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataGroupBy * * @param array $groupByArguments * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGroupBy')] public function testGroupBy($groupByArguments, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->select('column'); call_user_func_array( @@ -889,12 +890,12 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataAddGroupBy * * @param array $groupByArguments * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataAddGroupBy')] public function testAddGroupBy($groupByArguments, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->select('column'); $this->queryBuilder->groupBy('column1'); @@ -921,13 +922,13 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataSetValue * * @param string $column * @param string $value * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetValue')] public function testSetValue($column, $value, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->insert('data'); $this->queryBuilder->setValue($column, $value); @@ -944,13 +945,13 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataSetValue * * @param string $column * @param string $value * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetValue')] public function testValues($column, $value, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->insert('data'); $this->queryBuilder->values([ @@ -986,12 +987,12 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataHaving * * @param array $havingArguments * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataHaving')] public function testHaving($havingArguments, $expectedQueryPart, $expectedQuery): void { call_user_func_array( [$this->queryBuilder, 'having'], @@ -1027,12 +1028,12 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataAndHaving * * @param array $havingArguments * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataAndHaving')] public function testAndHaving($havingArguments, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->having('condition1'); call_user_func_array( @@ -1069,12 +1070,12 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataOrHaving * * @param array $havingArguments * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataOrHaving')] public function testOrHaving($havingArguments, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->having('condition1'); call_user_func_array( @@ -1102,13 +1103,13 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataOrderBy * * @param string $sort * @param string $order * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataOrderBy')] public function testOrderBy($sort, $order, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->orderBy($sort, $order); @@ -1138,7 +1139,6 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataAddOrderBy * * @param string $sort2 * @param string $order2 @@ -1146,6 +1146,7 @@ class QueryBuilderTest extends \Test\TestCase { * @param array $expectedQueryPart * @param string $expectedQuery */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataAddOrderBy')] public function testAddOrderBy($sort2, $order2, $order1, $expectedQueryPart, $expectedQuery): void { $this->queryBuilder->orderBy('column1', $order1); $this->queryBuilder->addOrderBy($sort2, $order2); @@ -1218,12 +1219,12 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataGetTableName * * @param string|IQueryFunction $tableName * @param bool $automatic * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetTableName')] public function testGetTableName($tableName, $automatic, $expected): void { if ($automatic !== null) { $this->queryBuilder->automaticTablePrefix($automatic); @@ -1243,11 +1244,11 @@ class QueryBuilderTest extends \Test\TestCase { } /** - * @dataProvider dataGetColumnName * @param string $column * @param string $prefix * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetColumnName')] public function testGetColumnName($column, $prefix, $expected): void { $this->assertSame( $expected, diff --git a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php index eb09055033e..6efb55708a1 100644 --- a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php +++ b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -37,10 +38,10 @@ class QuoteHelperTest extends \Test\TestCase { } /** - * @dataProvider dataQuoteColumnName * @param mixed $input * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataQuoteColumnName')] public function testQuoteColumnName($input, $expected): void { $this->assertSame( $expected, @@ -72,10 +73,10 @@ class QuoteHelperTest extends \Test\TestCase { } /** - * @dataProvider dataQuoteColumnNames * @param mixed $input * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataQuoteColumnNames')] public function testQuoteColumnNames($input, $expected): void { $this->assertSame( $expected, diff --git a/tests/lib/DateTimeFormatterTest.php b/tests/lib/DateTimeFormatterTest.php index 84319512f58..dce6692f9cb 100644 --- a/tests/lib/DateTimeFormatterTest.php +++ b/tests/lib/DateTimeFormatterTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -77,9 +78,7 @@ class DateTimeFormatterTest extends TestCase { ]; } - /** - * @dataProvider formatTimeSpanData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('formatTimeSpanData')] public function testFormatTimeSpan($expected, $timestamp, $compare, $locale = null): void { $this->assertEquals((string)$expected, (string)$this->formatter->formatTimeSpan($timestamp, $compare, $locale)); } @@ -143,9 +142,7 @@ class DateTimeFormatterTest extends TestCase { ]; } - /** - * @dataProvider formatDateSpanData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('formatDateSpanData')] public function testFormatDateSpan($expected, $timestamp, $compare = null, $locale = null): void { $this->assertEquals((string)$expected, (string)$this->formatter->formatDateSpan($timestamp, $compare, $locale)); } @@ -156,9 +153,7 @@ class DateTimeFormatterTest extends TestCase { ]; } - /** - * @dataProvider formatDateData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('formatDateData')] public function testFormatDate($timestamp, $expected): void { $this->assertEquals($expected, (string)$this->formatter->formatDate($timestamp)); } @@ -170,9 +165,7 @@ class DateTimeFormatterTest extends TestCase { ]; } - /** - * @dataProvider formatDateTimeData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('formatDateTimeData')] public function testFormatDateTime($timestamp, $timeZone, $expected): void { $this->assertEquals($expected, (string)$this->formatter->formatDateTime($timestamp, 'long', 'long', $timeZone)); } diff --git a/tests/lib/Diagnostics/EventLoggerTest.php b/tests/lib/Diagnostics/EventLoggerTest.php index 3ad13702679..ea9e95f80b3 100644 --- a/tests/lib/Diagnostics/EventLoggerTest.php +++ b/tests/lib/Diagnostics/EventLoggerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 ownCloud, Inc. diff --git a/tests/lib/Diagnostics/QueryLoggerTest.php b/tests/lib/Diagnostics/QueryLoggerTest.php index 6450c153b39..e54775a777f 100644 --- a/tests/lib/Diagnostics/QueryLoggerTest.php +++ b/tests/lib/Diagnostics/QueryLoggerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 ownCloud, Inc. @@ -13,7 +14,7 @@ use Test\TestCase; class QueryLoggerTest extends TestCase { /** @var \OC\Diagnostics\QueryLogger */ private $logger; - + protected function setUp(): void { parent::setUp(); diff --git a/tests/lib/DirectEditing/ManagerTest.php b/tests/lib/DirectEditing/ManagerTest.php index 1b38cfafaa6..2ad7f98df49 100644 --- a/tests/lib/DirectEditing/ManagerTest.php +++ b/tests/lib/DirectEditing/ManagerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/EmojiHelperTest.php b/tests/lib/EmojiHelperTest.php index 517d8655e53..9a89a4b299e 100644 --- a/tests/lib/EmojiHelperTest.php +++ b/tests/lib/EmojiHelperTest.php @@ -27,9 +27,8 @@ class EmojiHelperTest extends TestCase { /** * @param bool $supports4ByteText * @param bool $expected - * - * @dataProvider doesPlatformSupportEmojiDataProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('doesPlatformSupportEmojiDataProvider')] public function testDoesPlatformSupportEmoji(bool $supports4ByteText, bool $expected): void { $this->db->expects($this->once()) ->method('supports4ByteText') @@ -48,9 +47,8 @@ class EmojiHelperTest extends TestCase { /** * @param string $emoji * @param bool $expected - * - * @dataProvider isValidSingleEmojiDataProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('isValidSingleEmojiDataProvider')] public function testIsValidSingleEmoji(string $emoji, bool $expected): void { $actual = $this->helper->isValidSingleEmoji($emoji); diff --git a/tests/lib/Encryption/DecryptAllTest.php b/tests/lib/Encryption/DecryptAllTest.php index fc8600b9fc6..979e12e03b3 100644 --- a/tests/lib/Encryption/DecryptAllTest.php +++ b/tests/lib/Encryption/DecryptAllTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -44,7 +45,7 @@ class DecryptAllTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Output\OutputInterface */ protected $outputInterface; - /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\UserInterface */ + /** @var \PHPUnit\Framework\MockObject\MockObject|UserInterface */ protected $userInterface; /** @var DecryptAll */ @@ -93,11 +94,11 @@ class DecryptAllTest extends TestCase { } /** - * @dataProvider dataDecryptAll * @param bool $prepareResult * @param string $user * @param bool $userExistsChecked */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataDecryptAll')] public function testDecryptAll($prepareResult, $user, $userExistsChecked): void { if ($userExistsChecked) { $this->userManager->expects($this->once())->method('userExists')->willReturn(true); @@ -153,9 +154,9 @@ class DecryptAllTest extends TestCase { } /** - * @dataProvider dataTrueFalse * @param bool $success */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTrueFalse')] public function testPrepareEncryptionModules($success): void { $user = 'user1'; @@ -185,9 +186,7 @@ class DecryptAllTest extends TestCase { ); } - /** - * @dataProvider dataTestDecryptAllUsersFiles - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestDecryptAllUsersFiles')] public function testDecryptAllUsersFiles($user): void { /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject | $instance */ $instance = $this->getMockBuilder('OC\Encryption\DecryptAll') @@ -317,9 +316,7 @@ class DecryptAllTest extends TestCase { $this->invokePrivate($instance, 'decryptUsersFiles', ['user1', $progressBar, '']); } - /** - * @dataProvider dataTrueFalse - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTrueFalse')] public function testDecryptFile($isEncrypted): void { $path = 'test.txt'; diff --git a/tests/lib/Encryption/EncryptionWrapperTest.php b/tests/lib/Encryption/EncryptionWrapperTest.php index 342a7214e44..58bf5aff005 100644 --- a/tests/lib/Encryption/EncryptionWrapperTest.php +++ b/tests/lib/Encryption/EncryptionWrapperTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -28,7 +29,7 @@ class EncryptionWrapperTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Encryption\Manager */ private $manager; - /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Memcache\ArrayCache */ + /** @var \PHPUnit\Framework\MockObject\MockObject|ArrayCache */ private $arrayCache; protected function setUp(): void { @@ -42,9 +43,7 @@ class EncryptionWrapperTest extends TestCase { } - /** - * @dataProvider provideWrapStorage - */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideWrapStorage')] public function testWrapStorage($expectedWrapped, $wrappedStorages): void { $storage = $this->getMockBuilder(IStorage::class) ->disableOriginalConstructor() diff --git a/tests/lib/Encryption/Keys/StorageTest.php b/tests/lib/Encryption/Keys/StorageTest.php index 348b0ecf10d..333d8d8ce21 100644 --- a/tests/lib/Encryption/Keys/StorageTest.php +++ b/tests/lib/Encryption/Keys/StorageTest.php @@ -124,13 +124,13 @@ class StorageTest extends TestCase { } /** - * @dataProvider dataTestGetFileKey * * @param string $path * @param string $strippedPartialName * @param bool $originalKeyExists * @param string $expectedKeyContent */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestGetFileKey')] public function testGetFileKey($path, $strippedPartialName, $originalKeyExists, $expectedKeyContent): void { $this->config->method('getSystemValueString') ->with('version') @@ -408,9 +408,7 @@ class StorageTest extends TestCase { ); } - /** - * @dataProvider dataProviderCopyRename - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderCopyRename')] public function testRenameKeys($source, $target, $systemWideMountSource, $systemWideMountTarget, $expectedSource, $expectedTarget): void { $this->view->expects($this->any()) ->method('file_exists') @@ -439,9 +437,7 @@ class StorageTest extends TestCase { $this->storage->renameKeys($source, $target); } - /** - * @dataProvider dataProviderCopyRename - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderCopyRename')] public function testCopyKeys($source, $target, $systemWideMountSource, $systemWideMountTarget, $expectedSource, $expectedTarget): void { $this->view->expects($this->any()) ->method('file_exists') @@ -510,13 +506,13 @@ class StorageTest extends TestCase { } /** - * @dataProvider dataTestGetPathToKeys * * @param string $path * @param boolean $systemWideMountPoint * @param string $storageRoot * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestGetPathToKeys')] public function testGetPathToKeys($path, $systemWideMountPoint, $storageRoot, $expected): void { $this->invokePrivate($this->storage, 'root_dir', [$storageRoot]); @@ -569,9 +565,9 @@ class StorageTest extends TestCase { /** - * @dataProvider dataTestBackupUserKeys * @param bool $createBackupDir */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestBackupUserKeys')] public function testBackupUserKeys($createBackupDir): void { $storage = $this->getMockBuilder('OC\Encryption\Keys\Storage') ->setConstructorArgs([$this->view, $this->util, $this->crypto, $this->config]) diff --git a/tests/lib/Encryption/ManagerTest.php b/tests/lib/Encryption/ManagerTest.php index c268540d8cd..e9b6ddae8a0 100644 --- a/tests/lib/Encryption/ManagerTest.php +++ b/tests/lib/Encryption/ManagerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -265,7 +266,7 @@ class ManagerTest extends TestCase { $encryptionModule->expects($this->any()) ->method('getDisplayName') ->willReturn('TestDummyModule' . $id); - /** @var \OCP\Encryption\IEncryptionModule $encryptionModule */ + /** @var IEncryptionModule $encryptionModule */ $manager->registerEncryptionModule('ID' . $id, 'TestDummyModule' . $id, function () use ($encryptionModule) { return $encryptionModule; }); diff --git a/tests/lib/Encryption/UpdateTest.php b/tests/lib/Encryption/UpdateTest.php index 4f3de2b495d..04ca224c0a1 100644 --- a/tests/lib/Encryption/UpdateTest.php +++ b/tests/lib/Encryption/UpdateTest.php @@ -77,13 +77,13 @@ class UpdateTest extends TestCase { } /** - * @dataProvider dataTestUpdate * * @param string $path * @param boolean $isDir * @param array $allFiles * @param integer $numberOfFiles */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestUpdate')] public function testUpdate($path, $isDir, $allFiles, $numberOfFiles): void { $updateMock = $this->getUpdateMock(['getOwnerPath']); $updateMock->expects($this->once())->method('getOwnerPath') @@ -121,11 +121,11 @@ class UpdateTest extends TestCase { } /** - * @dataProvider dataTestPostRename * * @param string $source * @param string $target */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestPostRename')] public function testPostRename($source, $target): void { $updateMock = $this->getUpdateMock(['update','getOwnerPath']); diff --git a/tests/lib/Encryption/UtilTest.php b/tests/lib/Encryption/UtilTest.php index 6f637bdac40..d1fefee872a 100644 --- a/tests/lib/Encryption/UtilTest.php +++ b/tests/lib/Encryption/UtilTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -54,9 +55,7 @@ class UtilTest extends TestCase { ); } - /** - * @dataProvider providesHeadersForEncryptionModule - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesHeadersForEncryptionModule')] public function testGetEncryptionModuleId($expected, $header): void { $id = $this->util->getEncryptionModuleId($header); $this->assertEquals($expected, $id); @@ -70,9 +69,7 @@ class UtilTest extends TestCase { ]; } - /** - * @dataProvider providesHeaders - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesHeaders')] public function testCreateHeader($expected, $header, $moduleId): void { $em = $this->createMock(IEncryptionModule::class); $em->expects($this->any())->method('getId')->willReturn($moduleId); @@ -103,9 +100,7 @@ class UtilTest extends TestCase { $this->util->createHeader($header, $em); } - /** - * @dataProvider providePathsForTestIsExcluded - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providePathsForTestIsExcluded')] public function testIsExcluded($path, $keyStorageRoot, $expected): void { $this->config->expects($this->once()) ->method('getAppValue') @@ -144,9 +139,7 @@ class UtilTest extends TestCase { return false; } - /** - * @dataProvider dataTestIsFile - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestIsFile')] public function testIsFile($path, $expected): void { $this->assertSame($expected, $this->util->isFile($path) @@ -166,11 +159,11 @@ class UtilTest extends TestCase { } /** - * @dataProvider dataTestStripPartialFileExtension * * @param string $path * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestStripPartialFileExtension')] public function testStripPartialFileExtension($path, $expected): void { $this->assertSame($expected, $this->util->stripPartialFileExtension($path)); @@ -185,9 +178,7 @@ class UtilTest extends TestCase { ]; } - /** - * @dataProvider dataTestParseRawHeader - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestParseRawHeader')] public function testParseRawHeader($rawHeader, $expected): void { $result = $this->util->parseRawHeader($rawHeader); $this->assertSameSize($expected, $result); @@ -213,12 +204,12 @@ class UtilTest extends TestCase { } /** - * @dataProvider dataTestGetFileKeyDir * * @param bool $isSystemWideMountPoint * @param string $storageRoot * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestGetFileKeyDir')] public function testGetFileKeyDir($isSystemWideMountPoint, $storageRoot, $expected): void { $path = '/user1/files/foo/bar.txt'; $owner = 'user1'; diff --git a/tests/lib/ErrorHandlerTest.php b/tests/lib/ErrorHandlerTest.php index 00cf8e4c8db..0bec3445d34 100644 --- a/tests/lib/ErrorHandlerTest.php +++ b/tests/lib/ErrorHandlerTest.php @@ -55,10 +55,10 @@ class ErrorHandlerTest extends TestCase { } /** - * @dataProvider passwordProvider * @param string $username * @param string $password */ + #[\PHPUnit\Framework\Attributes\DataProvider('passwordProvider')] public function testRemovePasswordFromError($username, $password): void { $url = 'http://' . $username . ':' . $password . '@owncloud.org'; $expectedResult = 'http://xxx:xxx@owncloud.org'; diff --git a/tests/lib/EventSourceFactoryTest.php b/tests/lib/EventSourceFactoryTest.php index c5e22a8fe34..96d6e6e770a 100644 --- a/tests/lib/EventSourceFactoryTest.php +++ b/tests/lib/EventSourceFactoryTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Federation/CloudIdManagerTest.php b/tests/lib/Federation/CloudIdManagerTest.php index 0bd0659b2f2..3bd3cf6149d 100644 --- a/tests/lib/Federation/CloudIdManagerTest.php +++ b/tests/lib/Federation/CloudIdManagerTest.php @@ -65,9 +65,7 @@ class CloudIdManagerTest extends TestCase { ]; } - /** - * @dataProvider dataGetDisplayNameFromContact - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetDisplayNameFromContact')] public function testGetDisplayNameFromContact(string $cloudId, ?string $displayName, ?string $expected): void { $returnedContact = [ 'CLOUD' => [$cloudId], @@ -98,9 +96,7 @@ class CloudIdManagerTest extends TestCase { ]; } - /** - * @dataProvider cloudIdProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('cloudIdProvider')] public function testResolveCloudId(string $cloudId, string $user, string $noProtocolRemote, string $cleanId): void { $displayName = 'Ample Ex'; @@ -130,9 +126,7 @@ class CloudIdManagerTest extends TestCase { ]; } - /** - * @dataProvider invalidCloudIdProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('invalidCloudIdProvider')] public function testInvalidCloudId(string $cloudId): void { $this->expectException(\InvalidArgumentException::class); @@ -154,9 +148,7 @@ class CloudIdManagerTest extends TestCase { ]; } - /** - * @dataProvider getCloudIdProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('getCloudIdProvider')] public function testGetCloudId(string $user, ?string $remote, string $id, ?string $searchCloudId = null, ?string $localHost = 'https://example.com', ?string $expectedRemoteId = null): void { if ($remote !== null) { $this->contactsManager->expects($this->any()) diff --git a/tests/lib/Federation/CloudIdTest.php b/tests/lib/Federation/CloudIdTest.php index ec3cc15d6ff..67683861e40 100644 --- a/tests/lib/Federation/CloudIdTest.php +++ b/tests/lib/Federation/CloudIdTest.php @@ -37,9 +37,7 @@ class CloudIdTest extends TestCase { ]; } - /** - * @dataProvider dataGetDisplayCloudId - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetDisplayCloudId')] public function testGetDisplayCloudId(string $id, string $user, string $remote, string $display, ?string $addressbookName = null): void { $this->cloudIdManager->expects($this->once()) ->method('getDisplayNameFromContact') diff --git a/tests/lib/Files/AppData/AppDataTest.php b/tests/lib/Files/AppData/AppDataTest.php index 494096d1ac3..ed006622504 100644 --- a/tests/lib/Files/AppData/AppDataTest.php +++ b/tests/lib/Files/AppData/AppDataTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Files/AppData/FactoryTest.php b/tests/lib/Files/AppData/FactoryTest.php index dff999d8b48..6092c931091 100644 --- a/tests/lib/Files/AppData/FactoryTest.php +++ b/tests/lib/Files/AppData/FactoryTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php index 18670300850..383962b7224 100644 --- a/tests/lib/Files/Cache/CacheTest.php +++ b/tests/lib/Files/Cache/CacheTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -37,20 +38,20 @@ class LongId extends Temporary { */ class CacheTest extends \Test\TestCase { /** - * @var \OC\Files\Storage\Temporary $storage ; + * @var Temporary $storage ; */ protected $storage; /** - * @var \OC\Files\Storage\Temporary $storage2 ; + * @var Temporary $storage2 ; */ protected $storage2; /** - * @var \OC\Files\Cache\Cache $cache + * @var Cache $cache */ protected $cache; /** - * @var \OC\Files\Cache\Cache $cache2 + * @var Cache $cache2 */ protected $cache2; @@ -161,9 +162,7 @@ class CacheTest extends \Test\TestCase { $this->assertEquals(new CacheEntry(['size' => 12, 'mtime' => 15]), $this->cache->get($file1)); } - /** - * @dataProvider folderDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('folderDataProvider')] public function testFolder($folder): void { if (strpos($folder, 'F09F9890')) { // 4 byte UTF doesn't work on mysql @@ -334,9 +333,9 @@ class CacheTest extends \Test\TestCase { } /** - * @dataProvider putWithAllKindOfQuotesData * @param $fileName */ + #[\PHPUnit\Framework\Attributes\DataProvider('putWithAllKindOfQuotesData')] public function testPutWithAllKindOfQuotes($fileName): void { $this->assertEquals(Cache::NOT_FOUND, $this->cache->get($fileName)); $this->cache->put($fileName, ['size' => 20, 'mtime' => 25, 'mimetype' => 'foo/file', 'etag' => $fileName]); @@ -469,9 +468,7 @@ class CacheTest extends \Test\TestCase { ]; } - /** - * @dataProvider movePathProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('movePathProvider')] public function testMove($sourceFolder, $targetFolder, $children): void { $data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'foo/bar']; $folderData = ['size' => 100, 'mtime' => 50, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]; @@ -596,7 +593,7 @@ class CacheTest extends \Test\TestCase { $folderWith0308 = "\x53\x63\x68\x6f\xcc\x88\x6e"; /** - * @var \OC\Files\Cache\Cache | \PHPUnit\Framework\MockObject\MockObject $cacheMock + * @var Cache|\PHPUnit\Framework\MockObject\MockObject $cacheMock */ $cacheMock = $this->getMockBuilder(Cache::class) ->onlyMethods(['normalize']) @@ -681,9 +678,8 @@ class CacheTest extends \Test\TestCase { /** * Test bogus paths with leading or doubled slashes - * - * @dataProvider bogusPathNamesProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('bogusPathNamesProvider')] public function testBogusPaths($bogusPath, $fixedBogusPath): void { $data = ['size' => 100, 'mtime' => 50, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]; $parentId = $this->cache->getId(''); @@ -725,8 +721,8 @@ class CacheTest extends \Test\TestCase { /** * @param string $name - * @dataProvider escapingProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('escapingProvider')] public function testEscaping($name): void { $data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain']; $this->cache->put($name, $data); diff --git a/tests/lib/Files/Cache/HomeCacheTest.php b/tests/lib/Files/Cache/HomeCacheTest.php index 5130ad2730a..86fda615fd7 100644 --- a/tests/lib/Files/Cache/HomeCacheTest.php +++ b/tests/lib/Files/Cache/HomeCacheTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -57,7 +58,7 @@ class HomeCacheTest extends \Test\TestCase { private $cache; /** - * @var \OC\User\User $user + * @var User $user */ private $user; diff --git a/tests/lib/Files/Cache/MoveFromCacheTraitTest.php b/tests/lib/Files/Cache/MoveFromCacheTraitTest.php index fc36a10892a..d580cdca4b9 100644 --- a/tests/lib/Files/Cache/MoveFromCacheTraitTest.php +++ b/tests/lib/Files/Cache/MoveFromCacheTraitTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Cache/PropagatorTest.php b/tests/lib/Files/Cache/PropagatorTest.php index e88816dfccc..2ab213e9567 100644 --- a/tests/lib/Files/Cache/PropagatorTest.php +++ b/tests/lib/Files/Cache/PropagatorTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Cache/ScannerTest.php b/tests/lib/Files/Cache/ScannerTest.php index 0502cd3717a..123c13893f7 100644 --- a/tests/lib/Files/Cache/ScannerTest.php +++ b/tests/lib/Files/Cache/ScannerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -385,11 +386,11 @@ class ScannerTest extends TestCase { } /** - * @dataProvider dataTestIsPartialFile * * @param string $path * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestIsPartialFile')] public function testIsPartialFile($path, $expected): void { $this->assertSame($expected, $this->scanner->isPartialFile($path) diff --git a/tests/lib/Files/Cache/SearchBuilderTest.php b/tests/lib/Files/Cache/SearchBuilderTest.php index 957cf6c9f42..ee097044e3b 100644 --- a/tests/lib/Files/Cache/SearchBuilderTest.php +++ b/tests/lib/Files/Cache/SearchBuilderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -177,11 +178,11 @@ class SearchBuilderTest extends TestCase { } /** - * @dataProvider comparisonProvider * * @param ISearchOperator $operator * @param array $fileIds */ + #[\PHPUnit\Framework\Attributes\DataProvider('comparisonProvider')] public function testComparison(ISearchOperator $operator, array $fileIds): void { $fileId = []; $fileId[] = $this->addCacheEntry([ diff --git a/tests/lib/Files/Cache/UpdaterLegacyTest.php b/tests/lib/Files/Cache/UpdaterLegacyTest.php index 5d1abb46c0d..c71fac2d2dc 100644 --- a/tests/lib/Files/Cache/UpdaterLegacyTest.php +++ b/tests/lib/Files/Cache/UpdaterLegacyTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -7,7 +8,10 @@ namespace Test\Files\Cache; +use OC\Files\Cache\Cache; +use OC\Files\Cache\Scanner; use OC\Files\Filesystem as Filesystem; +use OC\Files\Storage\Storage; use OC\Files\Storage\Temporary; use OC\Files\View; use OCP\Files\Mount\IMountManager; @@ -23,17 +27,17 @@ use OCP\Server; */ class UpdaterLegacyTest extends \Test\TestCase { /** - * @var \OC\Files\Storage\Storage $storage + * @var Storage $storage */ private $storage; /** - * @var \OC\Files\Cache\Scanner $scanner + * @var Scanner $scanner */ private $scanner; /** - * @var \OC\Files\Cache\Cache $cache + * @var Cache $cache */ private $cache; diff --git a/tests/lib/Files/Cache/UpdaterTest.php b/tests/lib/Files/Cache/UpdaterTest.php index bc4b39a5dc4..65c47cb9ae6 100644 --- a/tests/lib/Files/Cache/UpdaterTest.php +++ b/tests/lib/Files/Cache/UpdaterTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -7,10 +8,13 @@ namespace Test\Files\Cache; +use OC\Files\Cache\Cache; use OC\Files\Filesystem; use OC\Files\ObjectStore\ObjectStoreStorage; use OC\Files\ObjectStore\StorageObjectStore; +use OC\Files\Storage\Storage; use OC\Files\Storage\Temporary; +use OC\Files\View; use OCP\Files\Storage\IStorage; /** @@ -22,17 +26,17 @@ use OCP\Files\Storage\IStorage; */ class UpdaterTest extends \Test\TestCase { /** - * @var \OC\Files\Storage\Storage + * @var Storage */ protected $storage; /** - * @var \OC\Files\Cache\Cache + * @var Cache */ protected $cache; /** - * @var \OC\Files\View + * @var View */ protected $view; @@ -312,9 +316,7 @@ class UpdaterTest extends \Test\TestCase { ]; } - /** - * @dataProvider changeExtensionProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('changeExtensionProvider')] public function testChangeExtension(IStorage $storage) { $updater = $storage->getUpdater(); $cache = $storage->getCache(); diff --git a/tests/lib/Files/Cache/WatcherTest.php b/tests/lib/Files/Cache/WatcherTest.php index c086fb3206d..6d0a8e0886b 100644 --- a/tests/lib/Files/Cache/WatcherTest.php +++ b/tests/lib/Files/Cache/WatcherTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -8,6 +9,7 @@ namespace Test\Files\Cache; use OC\Files\Cache\Watcher; +use OC\Files\Storage\Storage; use OC\Files\Storage\Temporary; /** @@ -19,7 +21,7 @@ use OC\Files\Storage\Temporary; */ class WatcherTest extends \Test\TestCase { /** - * @var \OC\Files\Storage\Storage[] $storages + * @var Storage[] $storages */ private $storages = []; @@ -175,7 +177,7 @@ class WatcherTest extends \Test\TestCase { /** * @param bool $scan - * @return \OC\Files\Storage\Storage + * @return Storage */ private function getTestStorage($scan = true) { $storage = new Temporary([]); diff --git a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php index 4073f3b9bae..8ac3492fbd2 100644 --- a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php +++ b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -7,6 +8,7 @@ namespace Test\Files\Cache\Wrapper; +use OC\Files\Cache\Cache; use OC\Files\Cache\Wrapper\CacheJail; use OC\Files\Cache\Wrapper\CacheWrapper; use OC\Files\Search\SearchComparison; @@ -27,7 +29,7 @@ use Test\Files\Cache\CacheTest; */ class CacheJailTest extends CacheTest { /** - * @var \OC\Files\Cache\Cache $sourceCache + * @var Cache $sourceCache */ protected $sourceCache; diff --git a/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php b/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php index e4e14e7d5d0..4fbeafc9270 100644 --- a/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php +++ b/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -7,6 +8,7 @@ namespace Test\Files\Cache\Wrapper; +use OC\Files\Cache\Cache; use OC\Files\Cache\Wrapper\CachePermissionsMask; use OCP\Constants; use Test\Files\Cache\CacheTest; @@ -20,7 +22,7 @@ use Test\Files\Cache\CacheTest; */ class CachePermissionsMaskTest extends CacheTest { /** - * @var \OC\Files\Cache\Cache $sourceCache + * @var Cache $sourceCache */ protected $sourceCache; @@ -45,9 +47,9 @@ class CachePermissionsMaskTest extends CacheTest { } /** - * @dataProvider maskProvider * @param int $mask */ + #[\PHPUnit\Framework\Attributes\DataProvider('maskProvider')] public function testGetMasked($mask): void { $cache = $this->getMaskedCached($mask); $data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain', 'permissions' => Constants::PERMISSION_ALL]; @@ -62,9 +64,9 @@ class CachePermissionsMaskTest extends CacheTest { } /** - * @dataProvider maskProvider * @param int $mask */ + #[\PHPUnit\Framework\Attributes\DataProvider('maskProvider')] public function testGetFolderContentMasked($mask): void { $this->storage->mkdir('foo'); $this->storage->file_put_contents('foo/bar', 'asd'); @@ -81,9 +83,9 @@ class CachePermissionsMaskTest extends CacheTest { } /** - * @dataProvider maskProvider * @param int $mask */ + #[\PHPUnit\Framework\Attributes\DataProvider('maskProvider')] public function testSearchMasked($mask): void { $this->storage->mkdir('foo'); $this->storage->file_put_contents('foo/bar', 'asd'); diff --git a/tests/lib/Files/Config/UserMountCacheTest.php b/tests/lib/Files/Config/UserMountCacheTest.php index 55251e68110..6a3dc6a6d7e 100644 --- a/tests/lib/Files/Config/UserMountCacheTest.php +++ b/tests/lib/Files/Config/UserMountCacheTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/EtagTest.php b/tests/lib/Files/EtagTest.php index 82ed0ceff96..d1b344ee997 100644 --- a/tests/lib/Files/EtagTest.php +++ b/tests/lib/Files/EtagTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/FileInfoTest.php b/tests/lib/Files/FileInfoTest.php index 2979252f78a..b3d3c9f0fec 100644 --- a/tests/lib/Files/FileInfoTest.php +++ b/tests/lib/Files/FileInfoTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Files/FilenameValidatorTest.php b/tests/lib/Files/FilenameValidatorTest.php index a4951c2efd3..162275a2cf8 100644 --- a/tests/lib/Files/FilenameValidatorTest.php +++ b/tests/lib/Files/FilenameValidatorTest.php @@ -48,9 +48,7 @@ class FilenameValidatorTest extends TestCase { $this->database->method('supports4ByteText')->willReturn(true); } - /** - * @dataProvider dataValidateFilename - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataValidateFilename')] public function testValidateFilename( string $filename, array $forbiddenNames, @@ -87,9 +85,7 @@ class FilenameValidatorTest extends TestCase { $validator->validateFilename($filename); } - /** - * @dataProvider dataValidateFilename - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataValidateFilename')] public function testIsFilenameValid( string $filename, array $forbiddenNames, @@ -189,9 +185,7 @@ class FilenameValidatorTest extends TestCase { ]; } - /** - * @dataProvider data4ByteUnicode - */ + #[\PHPUnit\Framework\Attributes\DataProvider('data4ByteUnicode')] public function testDatabaseDoesNotSupport4ByteText($filename): void { $database = $this->createMock(IDBConnection::class); $database->expects($this->once()) @@ -209,9 +203,7 @@ class FilenameValidatorTest extends TestCase { ]; } - /** - * @dataProvider dataInvalidAsciiCharacters - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataInvalidAsciiCharacters')] public function testInvalidAsciiCharactersAreAlwaysForbidden(string $filename): void { $this->expectException(InvalidPathException::class); $validator = new FilenameValidator($this->l10n, $this->database, $this->config, $this->logger); @@ -255,9 +247,7 @@ class FilenameValidatorTest extends TestCase { ]; } - /** - * @dataProvider dataIsForbidden - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataIsForbidden')] public function testIsForbidden(string $filename, array $forbiddenNames, bool $expected): void { /** @var FilenameValidator&MockObject */ $validator = $this->getMockBuilder(FilenameValidator::class) @@ -291,9 +281,7 @@ class FilenameValidatorTest extends TestCase { ]; } - /** - * @dataProvider dataGetForbiddenExtensions - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetForbiddenExtensions')] public function testGetForbiddenExtensions(array $configValue, array $expectedValue): void { $validator = new FilenameValidator($this->l10n, $this->database, $this->config, $this->logger); $this->config @@ -317,9 +305,7 @@ class FilenameValidatorTest extends TestCase { ]; } - /** - * @dataProvider dataGetForbiddenFilenames - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetForbiddenFilenames')] public function testGetForbiddenFilenames(array $configValue, array $legacyValue, array $expectedValue): void { $validator = new FilenameValidator($this->l10n, $this->database, $this->config, $this->logger); $this->config @@ -349,9 +335,7 @@ class FilenameValidatorTest extends TestCase { ]; } - /** - * @dataProvider dataGetForbiddenBasenames - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetForbiddenBasenames')] public function testGetForbiddenBasenames(array $configValue, array $expectedValue): void { $validator = new FilenameValidator($this->l10n, $this->database, $this->config, $this->logger); $this->config @@ -375,9 +359,7 @@ class FilenameValidatorTest extends TestCase { ]; } - /** - * @dataProvider dataSanitizeFilename - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSanitizeFilename')] public function testSanitizeFilename( string $filename, array $forbiddenNames, @@ -452,9 +434,7 @@ class FilenameValidatorTest extends TestCase { ]; } - /** - * @dataProvider dataSanitizeFilenameCharacterReplacement - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSanitizeFilenameCharacterReplacement')] public function testSanitizeFilenameCharacterReplacement( string $filename, array $forbiddenCharacters, diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php index 9b5e24f8b74..a819acb1620 100644 --- a/tests/lib/Files/FilesystemTest.php +++ b/tests/lib/Files/FilesystemTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -15,6 +16,7 @@ use OC\User\NoUserException; use OCP\Files; use OCP\Files\Config\IMountProvider; use OCP\Files\Config\IMountProviderCollection; +use OCP\Files\Mount\IMountPoint; use OCP\Files\Storage\IStorageFactory; use OCP\IConfig; use OCP\ITempManager; @@ -37,7 +39,7 @@ class DummyMountProvider implements IMountProvider { * * @param IUser $user * @param IStorageFactory $loader - * @return \OCP\Files\Mount\IMountPoint[] + * @return IMountPoint[] */ public function getMountsForUser(IUser $user, IStorageFactory $loader) { return isset($this->mounts[$user->getUID()]) ? $this->mounts[$user->getUID()] : []; @@ -200,9 +202,7 @@ class FilesystemTest extends \Test\TestCase { ]; } - /** - * @dataProvider normalizePathData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('normalizePathData')] public function testNormalizePath($expected, $path, $stripTrailingSlash = true): void { $this->assertEquals($expected, Filesystem::normalizePath($path, $stripTrailingSlash)); } @@ -218,9 +218,7 @@ class FilesystemTest extends \Test\TestCase { ]; } - /** - * @dataProvider normalizePathKeepUnicodeData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('normalizePathKeepUnicodeData')] public function testNormalizePathKeepUnicode($expected, $path, $keepUnicode = false): void { $this->assertEquals($expected, Filesystem::normalizePath($path, true, false, $keepUnicode)); } @@ -259,9 +257,7 @@ class FilesystemTest extends \Test\TestCase { ]; } - /** - * @dataProvider isValidPathData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('isValidPathData')] public function testIsValidPath($path, $expected): void { $this->assertSame($expected, Filesystem::isValidPath($path)); } @@ -281,9 +277,7 @@ class FilesystemTest extends \Test\TestCase { ]; } - /** - * @dataProvider isFileBlacklistedData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('isFileBlacklistedData')] public function testIsFileBlacklisted($path, $expected): void { $this->assertSame($expected, Filesystem::isFileBlacklisted($path)); } diff --git a/tests/lib/Files/Mount/ManagerTest.php b/tests/lib/Files/Mount/ManagerTest.php index b2ddf2d8ef4..e6cf3348664 100644 --- a/tests/lib/Files/Mount/ManagerTest.php +++ b/tests/lib/Files/Mount/ManagerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Mount/MountPointTest.php b/tests/lib/Files/Mount/MountPointTest.php index af66a9028eb..bcbcc96e3a3 100644 --- a/tests/lib/Files/Mount/MountPointTest.php +++ b/tests/lib/Files/Mount/MountPointTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Mount/MountTest.php b/tests/lib/Files/Mount/MountTest.php index 7be7fc67cd6..05c8a7d58e7 100644 --- a/tests/lib/Files/Mount/MountTest.php +++ b/tests/lib/Files/Mount/MountTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2020-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php b/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php index c0b49813c93..dd696279b86 100644 --- a/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php +++ b/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Node/FileTest.php b/tests/lib/Files/Node/FileTest.php index f3d893d5af2..eec34d156ad 100644 --- a/tests/lib/Files/Node/FileTest.php +++ b/tests/lib/Files/Node/FileTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Node/FolderTest.php b/tests/lib/Files/Node/FolderTest.php index 53e8f07a0d3..439535cf2c1 100644 --- a/tests/lib/Files/Node/FolderTest.php +++ b/tests/lib/Files/Node/FolderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -24,8 +25,10 @@ use OC\Files\Search\SearchQuery; use OC\Files\Storage\Storage; use OC\Files\Storage\Temporary; use OC\Files\Storage\Wrapper\Jail; +use OC\Files\View; use OCP\Constants; use OCP\Files\Cache\ICacheEntry; +use OCP\Files\InvalidPathException; use OCP\Files\IRootFolder; use OCP\Files\Mount\IMountPoint; use OCP\Files\NotFoundException; @@ -70,7 +73,7 @@ class FolderTest extends NodeTestCase { public function testGetDirectoryContent(): void { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view + * @var View|\PHPUnit\Framework\MockObject\MockObject $view */ $root = $this->getMockBuilder(Root::class) ->setConstructorArgs([$manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager, $this->eventDispatcher, $this->cacheFactory]) @@ -693,9 +696,7 @@ class FolderTest extends NodeTestCase { ]; } - /** - * @dataProvider uniqueNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('uniqueNameProvider')] public function testGetUniqueName($name, $existingFiles, $expected): void { $manager = $this->createMock(Manager::class); $folderPath = '/bar/foo'; @@ -729,7 +730,7 @@ class FolderTest extends NodeTestCase { ->onlyMethods(['getUser', 'getMountsIn', 'getMount']) ->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager, $this->eventDispatcher, $this->cacheFactory]) ->getMock(); - /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\FileInfo $folderInfo */ + /** @var \PHPUnit\Framework\MockObject\MockObject|FileInfo $folderInfo */ $folderInfo = $this->getMockBuilder(FileInfo::class) ->disableOriginalConstructor()->getMock(); @@ -798,7 +799,7 @@ class FolderTest extends NodeTestCase { ->onlyMethods(['getUser', 'getMountsIn', 'getMount']) ->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager, $this->eventDispatcher, $this->cacheFactory]) ->getMock(); - /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\FileInfo $folderInfo */ + /** @var \PHPUnit\Framework\MockObject\MockObject|FileInfo $folderInfo */ $folderInfo = $this->getMockBuilder(FileInfo::class) ->disableOriginalConstructor()->getMock(); @@ -865,7 +866,7 @@ class FolderTest extends NodeTestCase { ->onlyMethods(['getUser', 'getMountsIn', 'getMount']) ->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager, $this->eventDispatcher, $this->cacheFactory]) ->getMock(); - /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\FileInfo $folderInfo */ + /** @var \PHPUnit\Framework\MockObject\MockObject|FileInfo $folderInfo */ $folderInfo = $this->getMockBuilder(FileInfo::class) ->disableOriginalConstructor()->getMock(); @@ -934,14 +935,14 @@ class FolderTest extends NodeTestCase { } /** - * @dataProvider offsetLimitProvider * @param int $offset * @param int $limit * @param string[] $expectedPaths * @param ISearchOrder[] $ordering * @throws NotFoundException - * @throws \OCP\Files\InvalidPathException + * @throws InvalidPathException */ + #[\PHPUnit\Framework\Attributes\DataProvider('offsetLimitProvider')] public function testSearchSubStoragesLimitOffset(int $offset, int $limit, array $expectedPaths, array $ordering): void { if (!$ordering) { $ordering = [new SearchOrder(ISearchOrder::DIRECTION_ASCENDING, 'fileid')]; diff --git a/tests/lib/Files/Node/HookConnectorTest.php b/tests/lib/Files/Node/HookConnectorTest.php index 0b7d26fd24d..3f3957bab1d 100644 --- a/tests/lib/Files/Node/HookConnectorTest.php +++ b/tests/lib/Files/Node/HookConnectorTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -152,8 +153,8 @@ class HookConnectorTest extends TestCase { /** * @param callable $operation * @param string $expectedHook - * @dataProvider viewToNodeProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('viewToNodeProvider')] public function testViewToNode(callable $operation, $expectedHook, $expectedLegacyEvent, $expectedEvent): void { $connector = new HookConnector($this->root, $this->view, $this->eventDispatcher, $this->logger); $connector->viewToNode(); @@ -221,8 +222,8 @@ class HookConnectorTest extends TestCase { /** * @param callable $operation * @param string $expectedHook - * @dataProvider viewToNodeProviderCopyRename */ + #[\PHPUnit\Framework\Attributes\DataProvider('viewToNodeProviderCopyRename')] public function testViewToNodeCopyRename(callable $operation, $expectedHook, $expectedLegacyEvent, $expectedEvent): void { $connector = new HookConnector($this->root, $this->view, $this->eventDispatcher, $this->logger); $connector->viewToNode(); diff --git a/tests/lib/Files/Node/IntegrationTest.php b/tests/lib/Files/Node/IntegrationTest.php index 6bd956326e9..f059afa1625 100644 --- a/tests/lib/Files/Node/IntegrationTest.php +++ b/tests/lib/Files/Node/IntegrationTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -8,6 +9,7 @@ namespace Test\Files\Node; use OC\Files\Node\Root; +use OC\Files\Storage\Storage; use OC\Files\Storage\Temporary; use OC\Files\View; use OC\Memcache\ArrayCache; @@ -36,12 +38,12 @@ class IntegrationTest extends \Test\TestCase { private $root; /** - * @var \OC\Files\Storage\Storage[] + * @var Storage[] */ private $storages; /** - * @var \OC\Files\View $view + * @var View $view */ private $view; diff --git a/tests/lib/Files/Node/NodeTestCase.php b/tests/lib/Files/Node/NodeTestCase.php index 6da4e1e9317..4aecd0fef11 100644 --- a/tests/lib/Files/Node/NodeTestCase.php +++ b/tests/lib/Files/Node/NodeTestCase.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -12,10 +13,13 @@ use OC\Files\Mount\Manager; use OC\Files\Node\File; use OC\Files\Node\Folder; use OC\Files\Node\Root; +use OC\Files\Storage\Storage; use OC\Files\View; use OC\Memcache\ArrayCache; +use OC\User\User; use OCP\Constants; use OCP\EventDispatcher\IEventDispatcher; +use OCP\Files\Config\IUserMountCache; use OCP\Files\InvalidPathException; use OCP\Files\IRootFolder; use OCP\Files\Mount\IMountPoint; @@ -34,15 +38,15 @@ use Psr\Log\LoggerInterface; * @package Test\Files\Node */ abstract class NodeTestCase extends \Test\TestCase { - /** @var \OC\User\User */ + /** @var User */ protected $user; /** @var \OC\Files\Mount\Manager */ protected $manager; - /** @var \OC\Files\View|\PHPUnit\Framework\MockObject\MockObject */ + /** @var View|\PHPUnit\Framework\MockObject\MockObject */ protected $view; /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject */ protected $root; - /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IUserMountCache|\PHPUnit\Framework\MockObject\MockObject */ protected $userMountCache; /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; @@ -83,7 +87,7 @@ abstract class NodeTestCase extends \Test\TestCase { } /** - * @return \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view + * @return View|\PHPUnit\Framework\MockObject\MockObject $view */ protected function getRootViewMock() { $view = $this->createMock(View::class); @@ -340,7 +344,7 @@ abstract class NodeTestCase extends \Test\TestCase { ->method('getUser') ->willReturn($this->user); /** - * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage + * @var Storage|\PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->getMockBuilder('\OC\Files\Storage\Storage') ->disableOriginalConstructor() @@ -364,7 +368,7 @@ abstract class NodeTestCase extends \Test\TestCase { ->method('getUser') ->willReturn($this->user); /** - * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage + * @var Storage|\PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->getMockBuilder('\OC\Files\Storage\Storage') ->disableOriginalConstructor() @@ -513,7 +517,7 @@ abstract class NodeTestCase extends \Test\TestCase { $this->expectException(NotPermittedException::class); /** - * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage + * @var Storage|\PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->createMock('\OC\Files\Storage\Storage'); @@ -606,12 +610,12 @@ abstract class NodeTestCase extends \Test\TestCase { } /** - * @dataProvider moveOrCopyProvider * @param string $operationMethod * @param string $viewMethod * @param string $preHookName * @param string $postHookName */ + #[\PHPUnit\Framework\Attributes\DataProvider('moveOrCopyProvider')] public function testMoveCopyHooks($operationMethod, $viewMethod, $preHookName, $postHookName): void { /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject $root */ $root = $this->getMockBuilder(Root::class) @@ -706,7 +710,7 @@ abstract class NodeTestCase extends \Test\TestCase { $this->expectException(NotFoundException::class); /** - * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage + * @var Storage|\PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->createMock('\OC\Files\Storage\Storage'); diff --git a/tests/lib/Files/Node/RootTest.php b/tests/lib/Files/Node/RootTest.php index 979ed1c6dcb..d90e6a2cc6e 100644 --- a/tests/lib/Files/Node/RootTest.php +++ b/tests/lib/Files/Node/RootTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -11,11 +12,14 @@ use OC\Files\FileInfo; use OC\Files\Mount\Manager; use OC\Files\Node\Folder; use OC\Files\Node\Root; +use OC\Files\Storage\Storage; use OC\Files\View; use OC\Memcache\ArrayCache; use OC\User\NoUserException; +use OC\User\User; use OCP\Cache\CappedMemoryCache; use OCP\EventDispatcher\IEventDispatcher; +use OCP\Files\Config\IUserMountCache; use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; use OCP\ICacheFactory; @@ -29,11 +33,11 @@ use Psr\Log\LoggerInterface; * @package Test\Files\Node */ class RootTest extends \Test\TestCase { - /** @var \OC\User\User */ + /** @var User */ private $user; /** @var \OC\Files\Mount\Manager */ private $manager; - /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IUserMountCache|\PHPUnit\Framework\MockObject\MockObject */ private $userMountCache; /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ private $logger; @@ -65,7 +69,7 @@ class RootTest extends \Test\TestCase { } /** - * @return \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view + * @return View|\PHPUnit\Framework\MockObject\MockObject $view */ protected function getRootViewMock() { $view = $this->createMock(View::class); @@ -81,7 +85,7 @@ class RootTest extends \Test\TestCase { public function testGet(): void { /** - * @var \OC\Files\Storage\Storage $storage + * @var Storage $storage */ $storage = $this->getMockBuilder('\OC\Files\Storage\Storage') ->disableOriginalConstructor() @@ -114,7 +118,7 @@ class RootTest extends \Test\TestCase { $this->expectException(NotFoundException::class); /** - * @var \OC\Files\Storage\Storage $storage + * @var Storage $storage */ $storage = $this->getMockBuilder('\OC\Files\Storage\Storage') ->disableOriginalConstructor() diff --git a/tests/lib/Files/ObjectStore/AzureTest.php b/tests/lib/Files/ObjectStore/AzureTest.php index 3c07f69f65d..52d2b9e8657 100644 --- a/tests/lib/Files/ObjectStore/AzureTest.php +++ b/tests/lib/Files/ObjectStore/AzureTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php b/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php index b84ee1a1b64..767125d42aa 100644 --- a/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php +++ b/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php @@ -11,10 +11,9 @@ namespace Test\Files\ObjectStore; use OCP\Files\ObjectStore\IObjectStore; class FailDeleteObjectStore implements IObjectStore { - private $objectStore; - - public function __construct(IObjectStore $objectStore) { - $this->objectStore = $objectStore; + public function __construct( + private IObjectStore $objectStore, + ) { } public function getStorageId() { diff --git a/tests/lib/Files/ObjectStore/FailWriteObjectStore.php b/tests/lib/Files/ObjectStore/FailWriteObjectStore.php index b84b123244e..924bbdada4f 100644 --- a/tests/lib/Files/ObjectStore/FailWriteObjectStore.php +++ b/tests/lib/Files/ObjectStore/FailWriteObjectStore.php @@ -11,10 +11,9 @@ namespace Test\Files\ObjectStore; use OCP\Files\ObjectStore\IObjectStore; class FailWriteObjectStore implements IObjectStore { - private $objectStore; - - public function __construct(IObjectStore $objectStore) { - $this->objectStore = $objectStore; + public function __construct( + private IObjectStore $objectStore, + ) { } public function getStorageId() { diff --git a/tests/lib/Files/ObjectStore/LocalTest.php b/tests/lib/Files/ObjectStore/LocalTest.php index 3b561c01049..d3e9ad56164 100644 --- a/tests/lib/Files/ObjectStore/LocalTest.php +++ b/tests/lib/Files/ObjectStore/LocalTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -8,10 +9,11 @@ namespace Test\Files\ObjectStore; use OC\Files\ObjectStore\StorageObjectStore; use OC\Files\Storage\Temporary; +use OCP\Files\ObjectStore\IObjectStore; class LocalTest extends ObjectStoreTestCase { /** - * @return \OCP\Files\ObjectStore\IObjectStore + * @return IObjectStore */ protected function getInstance() { $storage = new Temporary(); diff --git a/tests/lib/Files/ObjectStore/MapperTest.php b/tests/lib/Files/ObjectStore/MapperTest.php index 77416eae09a..6448d5ce1f5 100644 --- a/tests/lib/Files/ObjectStore/MapperTest.php +++ b/tests/lib/Files/ObjectStore/MapperTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -42,11 +43,11 @@ class MapperTest extends \Test\TestCase { } /** - * @dataProvider dataGetBucket * @param string $username * @param int $numBuckets * @param string $expectedBucket */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetBucket')] public function testGetBucket($username, $numBuckets, $bucketShift, $expectedBucket): void { $this->user->expects($this->once()) ->method('getUID') diff --git a/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php b/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php index 11c913cd232..ea6ac682c70 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php index cca75d4f35e..3387808445a 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -72,9 +73,7 @@ class ObjectStoreStorageTest extends Storage { $this->markTestSkipped('Detecting external changes is not supported on object storages'); } - /** - * @dataProvider copyAndMoveProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('copyAndMoveProvider')] public function testMove($source, $target): void { $this->initSourceAndTarget($source); $sourceId = $this->instance->getCache()->getId(ltrim($source, '/')); diff --git a/tests/lib/Files/ObjectStore/ObjectStoreStoragesDifferentBucketTest.php b/tests/lib/Files/ObjectStore/ObjectStoreStoragesDifferentBucketTest.php index a1befd4e79d..d39426ee821 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreStoragesDifferentBucketTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreStoragesDifferentBucketTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -9,6 +10,7 @@ namespace Test\Files\ObjectStore; use OC\Files\ObjectStore\StorageObjectStore; use OC\Files\Storage\Temporary; +use OCP\Files\ObjectStore\IObjectStore; use Test\Files\Storage\StoragesTestCase; /** @@ -16,12 +18,12 @@ use Test\Files\Storage\StoragesTestCase; */ class ObjectStoreStoragesDifferentBucketTest extends StoragesTestCase { /** - * @var \OCP\Files\ObjectStore\IObjectStore + * @var IObjectStore */ private $objectStore1; /** - * @var \OCP\Files\ObjectStore\IObjectStore + * @var IObjectStore */ private $objectStore2; diff --git a/tests/lib/Files/ObjectStore/ObjectStoreStoragesSameBucketTest.php b/tests/lib/Files/ObjectStore/ObjectStoreStoragesSameBucketTest.php index 5505ee1dac1..4e42668cd3f 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreStoragesSameBucketTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreStoragesSameBucketTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -9,6 +10,7 @@ namespace Test\Files\ObjectStore; use OC\Files\ObjectStore\StorageObjectStore; use OC\Files\Storage\Temporary; +use OCP\Files\ObjectStore\IObjectStore; use Test\Files\Storage\StoragesTestCase; /** @@ -16,7 +18,7 @@ use Test\Files\Storage\StoragesTestCase; */ class ObjectStoreStoragesSameBucketTest extends StoragesTestCase { /** - * @var \OCP\Files\ObjectStore\IObjectStore + * @var IObjectStore */ private $objectStore; diff --git a/tests/lib/Files/ObjectStore/ObjectStoreTestCase.php b/tests/lib/Files/ObjectStore/ObjectStoreTestCase.php index ecbfd9a37e6..03e7b9545e0 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreTestCase.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreTestCase.php @@ -7,6 +7,7 @@ namespace Test\Files\ObjectStore; +use OCP\Files\ObjectStore\IObjectStore; use Test\TestCase; abstract class ObjectStoreTestCase extends TestCase { @@ -16,7 +17,7 @@ abstract class ObjectStoreTestCase extends TestCase { private $instance = null; /** - * @return \OCP\Files\ObjectStore\IObjectStore + * @return IObjectStore */ abstract protected function getInstance(); diff --git a/tests/lib/Files/ObjectStore/S3Test.php b/tests/lib/Files/ObjectStore/S3Test.php index d3c282d0427..2915ada0aab 100644 --- a/tests/lib/Files/ObjectStore/S3Test.php +++ b/tests/lib/Files/ObjectStore/S3Test.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -134,7 +135,7 @@ class S3Test extends ObjectStoreTestCase { ]; } - /** @dataProvider dataFileSizes */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFileSizes')] public function testFileSizes($size): void { if (str_starts_with(PHP_VERSION, '8.3') && getenv('CI')) { $this->markTestSkipped('Test is unreliable and skipped on 8.3'); diff --git a/tests/lib/Files/ObjectStore/SwiftTest.php b/tests/lib/Files/ObjectStore/SwiftTest.php index 2321d8eafda..3f919c0dd48 100644 --- a/tests/lib/Files/ObjectStore/SwiftTest.php +++ b/tests/lib/Files/ObjectStore/SwiftTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -8,6 +9,7 @@ namespace Test\Files\ObjectStore; use OC\Files\ObjectStore\Swift; +use OCP\Files\ObjectStore\IObjectStore; use OCP\IConfig; use OCP\Server; @@ -16,7 +18,7 @@ use OCP\Server; */ class SwiftTest extends ObjectStoreTestCase { /** - * @return \OCP\Files\ObjectStore\IObjectStore + * @return IObjectStore */ protected function getInstance() { $config = Server::get(IConfig::class)->getSystemValue('objectstore'); diff --git a/tests/lib/Files/PathVerificationTest.php b/tests/lib/Files/PathVerificationTest.php index 8e4dfd1bb1e..e13dbe4f207 100644 --- a/tests/lib/Files/PathVerificationTest.php +++ b/tests/lib/Files/PathVerificationTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -22,7 +23,7 @@ use OCP\Server; */ class PathVerificationTest extends \Test\TestCase { /** - * @var \OC\Files\View + * @var View */ private $view; @@ -41,9 +42,7 @@ class PathVerificationTest extends \Test\TestCase { } - /** - * @dataProvider providesEmptyFiles - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesEmptyFiles')] public function testPathVerificationEmptyFileName($fileName): void { $this->expectException(InvalidPathException::class); $this->expectExceptionMessage('Empty filename is not allowed'); @@ -58,9 +57,7 @@ class PathVerificationTest extends \Test\TestCase { ]; } - /** - * @dataProvider providesDotFiles - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesDotFiles')] public function testPathVerificationDotFiles($fileName): void { $this->expectException(InvalidPathException::class); $this->expectExceptionMessage('Dot files are not allowed'); @@ -81,9 +78,7 @@ class PathVerificationTest extends \Test\TestCase { ]; } - /** - * @dataProvider providesAstralPlane - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesAstralPlane')] public function testPathVerificationAstralPlane($fileName): void { $connection = Server::get(IDBConnection::class); @@ -108,9 +103,7 @@ class PathVerificationTest extends \Test\TestCase { ]; } - /** - * @dataProvider providesValidPosixPaths - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesValidPosixPaths')] public function testPathVerificationValidPaths($fileName): void { $storage = new Local(['datadir' => '']); diff --git a/tests/lib/Files/Search/QueryOptimizer/CombinedTests.php b/tests/lib/Files/Search/QueryOptimizer/CombinedTests.php index e6cb11a7eba..665224cb63e 100644 --- a/tests/lib/Files/Search/QueryOptimizer/CombinedTests.php +++ b/tests/lib/Files/Search/QueryOptimizer/CombinedTests.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Files/Search/QueryOptimizer/FlattenNestedBoolTest.php b/tests/lib/Files/Search/QueryOptimizer/FlattenNestedBoolTest.php index 6777047d68b..1d43541a5a0 100644 --- a/tests/lib/Files/Search/QueryOptimizer/FlattenNestedBoolTest.php +++ b/tests/lib/Files/Search/QueryOptimizer/FlattenNestedBoolTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Files/Search/QueryOptimizer/MergeDistributiveOperationsTest.php b/tests/lib/Files/Search/QueryOptimizer/MergeDistributiveOperationsTest.php index 4f933d0c371..9aaa7030aac 100644 --- a/tests/lib/Files/Search/QueryOptimizer/MergeDistributiveOperationsTest.php +++ b/tests/lib/Files/Search/QueryOptimizer/MergeDistributiveOperationsTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Files/Search/QueryOptimizer/OrEqualsToInTest.php b/tests/lib/Files/Search/QueryOptimizer/OrEqualsToInTest.php index 8b1c3b992b2..d51fe3d0d16 100644 --- a/tests/lib/Files/Search/QueryOptimizer/OrEqualsToInTest.php +++ b/tests/lib/Files/Search/QueryOptimizer/OrEqualsToInTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Files/Search/SearchIntegrationTest.php b/tests/lib/Files/Search/SearchIntegrationTest.php index 0ca67285fd5..e3e99bbfadd 100644 --- a/tests/lib/Files/Search/SearchIntegrationTest.php +++ b/tests/lib/Files/Search/SearchIntegrationTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Files/SimpleFS/SimpleFileTest.php b/tests/lib/Files/SimpleFS/SimpleFileTest.php index d0676eae70f..6ce5ddad351 100644 --- a/tests/lib/Files/SimpleFS/SimpleFileTest.php +++ b/tests/lib/Files/SimpleFS/SimpleFileTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Files/SimpleFS/SimpleFolderTest.php b/tests/lib/Files/SimpleFS/SimpleFolderTest.php index 6897aab1f02..50038b286a9 100644 --- a/tests/lib/Files/SimpleFS/SimpleFolderTest.php +++ b/tests/lib/Files/SimpleFS/SimpleFolderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Files/Storage/CommonTest.php b/tests/lib/Files/Storage/CommonTest.php index d6904665904..c5ff6bb0b5f 100644 --- a/tests/lib/Files/Storage/CommonTest.php +++ b/tests/lib/Files/Storage/CommonTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Storage/CopyDirectoryTest.php b/tests/lib/Files/Storage/CopyDirectoryTest.php index 054101510b7..b593b7c984f 100644 --- a/tests/lib/Files/Storage/CopyDirectoryTest.php +++ b/tests/lib/Files/Storage/CopyDirectoryTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Storage/HomeTest.php b/tests/lib/Files/Storage/HomeTest.php index f459ff5c23b..84a9816cb0c 100644 --- a/tests/lib/Files/Storage/HomeTest.php +++ b/tests/lib/Files/Storage/HomeTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -49,7 +50,7 @@ class HomeTest extends Storage { private $userId; /** - * @var \OC\User\User $user + * @var User $user */ private $user; diff --git a/tests/lib/Files/Storage/LocalTest.php b/tests/lib/Files/Storage/LocalTest.php index e3953b7bde5..89449a51351 100644 --- a/tests/lib/Files/Storage/LocalTest.php +++ b/tests/lib/Files/Storage/LocalTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Storage/Storage.php b/tests/lib/Files/Storage/Storage.php index 3e239d005b7..51bb5b7c8ad 100644 --- a/tests/lib/Files/Storage/Storage.php +++ b/tests/lib/Files/Storage/Storage.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -50,9 +51,7 @@ abstract class Storage extends \Test\TestCase { $this->assertTrue($this->instance->test()); } - /** - * @dataProvider directoryProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('directoryProvider')] public function testDirectories($directory): void { $this->assertFalse($this->instance->file_exists('/' . $directory)); @@ -143,9 +142,8 @@ abstract class Storage extends \Test\TestCase { /** * test the various uses of file_get_contents and file_put_contents - * - * @dataProvider loremFileProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('loremFileProvider')] public function testGetPutContents($sourceFile): void { $sourceText = file_get_contents($sourceFile); @@ -211,9 +209,7 @@ abstract class Storage extends \Test\TestCase { ); } - /** - * @dataProvider copyAndMoveProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('copyAndMoveProvider')] public function testCopy($source, $target): void { $this->initSourceAndTarget($source); @@ -224,9 +220,7 @@ abstract class Storage extends \Test\TestCase { $this->assertTrue($this->instance->file_exists($source), $source . ' was deleted'); } - /** - * @dataProvider copyAndMoveProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('copyAndMoveProvider')] public function testMove($source, $target): void { $this->initSourceAndTarget($source); @@ -238,9 +232,7 @@ abstract class Storage extends \Test\TestCase { $this->assertSameAsLorem($target); } - /** - * @dataProvider copyAndMoveProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('copyAndMoveProvider')] public function testCopyOverwrite($source, $target): void { $this->initSourceAndTarget($source, $target); @@ -252,9 +244,7 @@ abstract class Storage extends \Test\TestCase { $this->assertSameAsLorem($source); } - /** - * @dataProvider copyAndMoveProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('copyAndMoveProvider')] public function testMoveOverwrite($source, $target): void { $this->initSourceAndTarget($source, $target); @@ -351,9 +341,7 @@ abstract class Storage extends \Test\TestCase { $this->assertFalse($this->instance->file_exists('/lorem.txt')); } - /** - * @dataProvider fileNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('fileNameProvider')] public function testFOpen($fileName): void { $textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt'; @@ -423,9 +411,7 @@ abstract class Storage extends \Test\TestCase { ]; } - /** - * @dataProvider hashProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('hashProvider')] public function testHash($data, $type): void { $this->instance->file_put_contents('hash.txt', $data); $this->assertEquals(hash($type, $data), $this->instance->hash($type, 'hash.txt')); @@ -579,9 +565,7 @@ abstract class Storage extends \Test\TestCase { $this->assertFalse($this->instance->instanceOfStorage('\OC')); } - /** - * @dataProvider copyAndMoveProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('copyAndMoveProvider')] public function testCopyFromSameStorage($source, $target): void { $this->initSourceAndTarget($source); diff --git a/tests/lib/Files/Storage/StorageFactoryTest.php b/tests/lib/Files/Storage/StorageFactoryTest.php index 2bdc3592631..0bb9cbf5824 100644 --- a/tests/lib/Files/Storage/StorageFactoryTest.php +++ b/tests/lib/Files/Storage/StorageFactoryTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Storage/StoragesTestCase.php b/tests/lib/Files/Storage/StoragesTestCase.php index 18fe78a93d1..565ff1ddfda 100644 --- a/tests/lib/Files/Storage/StoragesTestCase.php +++ b/tests/lib/Files/Storage/StoragesTestCase.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -7,16 +8,17 @@ namespace Test\Files\Storage; +use OC\Files\Storage\Storage; use Test\TestCase; abstract class StoragesTestCase extends TestCase { /** - * @var \OC\Files\Storage\Storage + * @var Storage */ protected $storage1; /** - * @var \OC\Files\Storage\Storage + * @var Storage */ protected $storage2; diff --git a/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php b/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php index 8e2ead4a423..d890081cbb6 100644 --- a/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php +++ b/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Storage/Wrapper/EncodingTest.php b/tests/lib/Files/Storage/Wrapper/EncodingTest.php index 2d29e2d0952..cb6b6de0fb7 100644 --- a/tests/lib/Files/Storage/Wrapper/EncodingTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncodingTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -15,7 +16,7 @@ class EncodingTest extends \Test\Files\Storage\Storage { public const NFC_NAME = 'รผmlaut'; /** - * @var \OC\Files\Storage\Temporary + * @var Temporary */ private $sourceStorage; @@ -57,17 +58,13 @@ class EncodingTest extends \Test\Files\Storage\Storage { ]; } - /** - * @dataProvider accessNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('accessNameProvider')] public function testFputEncoding($accessName): void { $this->sourceStorage->file_put_contents(self::NFD_NAME, 'bar'); $this->assertEquals('bar', $this->instance->file_get_contents($accessName)); } - /** - * @dataProvider accessNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('accessNameProvider')] public function testFopenReadEncoding($accessName): void { $this->sourceStorage->file_put_contents(self::NFD_NAME, 'bar'); $fh = $this->instance->fopen($accessName, 'r'); @@ -76,9 +73,7 @@ class EncodingTest extends \Test\Files\Storage\Storage { $this->assertEquals('bar', $data); } - /** - * @dataProvider accessNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('accessNameProvider')] public function testFopenOverwriteEncoding($accessName): void { $this->sourceStorage->file_put_contents(self::NFD_NAME, 'bar'); $fh = $this->instance->fopen($accessName, 'w'); @@ -89,17 +84,13 @@ class EncodingTest extends \Test\Files\Storage\Storage { $this->assertFalse($this->sourceStorage->file_exists(self::NFC_NAME)); } - /** - * @dataProvider accessNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('accessNameProvider')] public function testFileExistsEncoding($accessName): void { $this->sourceStorage->file_put_contents(self::NFD_NAME, 'bar'); $this->assertTrue($this->instance->file_exists($accessName)); } - /** - * @dataProvider accessNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('accessNameProvider')] public function testUnlinkEncoding($accessName): void { $this->sourceStorage->file_put_contents(self::NFD_NAME, 'bar'); $this->assertTrue($this->instance->unlink($accessName)); @@ -121,9 +112,7 @@ class EncodingTest extends \Test\Files\Storage\Storage { ]; } - /** - * @dataProvider encodedDirectoriesProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('encodedDirectoriesProvider')] public function testOperationInsideDirectory($sourceDir, $accessDir): void { $this->sourceStorage->mkdir($sourceDir); $this->instance->file_put_contents($accessDir . '/test.txt', 'bar'); @@ -162,9 +151,7 @@ class EncodingTest extends \Test\Files\Storage\Storage { ]; } - /** - * @dataProvider sourceAndTargetDirectoryProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('sourceAndTargetDirectoryProvider')] public function testCopyAndMoveEncodedFolder($sourceDir, $targetDir): void { $this->sourceStorage->mkdir($sourceDir); $this->sourceStorage->mkdir($targetDir); @@ -182,9 +169,7 @@ class EncodingTest extends \Test\Files\Storage\Storage { $this->assertEquals('bar', $this->instance->file_get_contents(self::NFC_NAME . '2/test2.txt')); } - /** - * @dataProvider sourceAndTargetDirectoryProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('sourceAndTargetDirectoryProvider')] public function testCopyAndMoveFromStorageEncodedFolder($sourceDir, $targetDir): void { $this->sourceStorage->mkdir($sourceDir); $this->sourceStorage->mkdir($targetDir); diff --git a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php index 8065854ec50..3e643714300 100644 --- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -193,7 +194,6 @@ class EncryptionTest extends Storage { } /** - * @dataProvider dataTestGetMetaData * * @param string $path * @param array $metaData @@ -202,6 +202,7 @@ class EncryptionTest extends Storage { * @param int $storedUnencryptedSize * @param array $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestGetMetaData')] public function testGetMetaData($path, $metaData, $encrypted, $unencryptedSizeSet, $storedUnencryptedSize, $expected): void { $sourceStorage = $this->getMockBuilder('\OC\Files\Storage\Storage') ->disableOriginalConstructor()->getMock(); @@ -327,13 +328,13 @@ class EncryptionTest extends Storage { } /** - * @dataProvider dataTestVerifyUnencryptedSize * * @param int $encryptedSize * @param int $unencryptedSize * @param bool $failure * @param int $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestVerifyUnencryptedSize')] public function testVerifyUnencryptedSize($encryptedSize, $unencryptedSize, $failure, $expected): void { $sourceStorage = $this->getMockBuilder('\OC\Files\Storage\Storage') ->disableOriginalConstructor()->getMock(); @@ -390,13 +391,13 @@ class EncryptionTest extends Storage { } /** - * @dataProvider dataTestCopyAndRename * * @param string $source * @param string $target * @param $encryptionEnabled * @param boolean $renameKeysReturn */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestCopyAndRename')] public function testRename($source, $target, $encryptionEnabled, @@ -452,13 +453,13 @@ class EncryptionTest extends Storage { } /** - * @dataProvider dataTestRmdir * * @param string $path * @param boolean $rmdirResult * @param boolean $isExcluded * @param boolean $encryptionEnabled */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestRmdir')] public function testRmdir($path, $rmdirResult, $isExcluded, $encryptionEnabled): void { $sourceStorage = $this->getMockBuilder('\OC\Files\Storage\Storage') ->disableOriginalConstructor()->getMock(); @@ -510,11 +511,11 @@ class EncryptionTest extends Storage { } /** - * @dataProvider dataTestCopyKeys * * @param boolean $excluded * @param boolean $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestCopyKeys')] public function testCopyKeys($excluded, $expected): void { $this->util->expects($this->once()) ->method('isExcluded') @@ -539,12 +540,12 @@ class EncryptionTest extends Storage { } /** - * @dataProvider dataTestGetHeader * * @param string $path * @param bool $strippedPathExists * @param string $strippedPath */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestGetHeader')] public function testGetHeader($path, $strippedPathExists, $strippedPath): void { $sourceStorage = $this->getMockBuilder('\OC\Files\Storage\Storage') ->disableOriginalConstructor()->getMock(); @@ -631,9 +632,8 @@ class EncryptionTest extends Storage { /** * test if getHeader adds the default module correctly to the header for * legacy files - * - * @dataProvider dataTestGetHeaderAddLegacyModule */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestGetHeaderAddLegacyModule')] public function testGetHeaderAddLegacyModule($header, $isEncrypted, $strippedPathExists, $expected): void { $sourceStorage = $this->getMockBuilder(\OC\Files\Storage\Storage::class) ->disableOriginalConstructor()->getMock(); @@ -761,12 +761,12 @@ class EncryptionTest extends Storage { } /** - * @dataProvider dataCopyBetweenStorage * * @param bool $encryptionEnabled * @param bool $mountPointEncryptionEnabled * @param bool $expectedEncrypted */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCopyBetweenStorage')] public function testCopyBetweenStorage($encryptionEnabled, $mountPointEncryptionEnabled, $expectedEncrypted): void { $storage2 = $this->createMock(\OC\Files\Storage\Storage::class); @@ -821,13 +821,13 @@ class EncryptionTest extends Storage { } /** - * @dataProvider dataTestCopyBetweenStorageVersions * * @param string $sourceInternalPath * @param string $targetInternalPath * @param bool $copyResult * @param bool $encrypted */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestCopyBetweenStorageVersions')] public function testCopyBetweenStorageVersions($sourceInternalPath, $targetInternalPath, $copyResult, $encrypted): void { $sourceStorage = $this->createMock(\OC\Files\Storage\Storage::class); @@ -915,10 +915,10 @@ class EncryptionTest extends Storage { } /** - * @dataProvider dataTestIsVersion * @param string $path * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestIsVersion')] public function testIsVersion($path, $expected): void { $this->assertSame($expected, $this->invokePrivate($this->instance, 'isVersion', [$path]) @@ -937,13 +937,13 @@ class EncryptionTest extends Storage { } /** - * @dataProvider dataTestShouldEncrypt * * @param bool $encryptMountPoint * @param mixed $encryptionModule * @param bool $encryptionModuleShouldEncrypt * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestShouldEncrypt')] public function testShouldEncrypt( $encryptMountPoint, $encryptionModule, diff --git a/tests/lib/Files/Storage/Wrapper/JailTest.php b/tests/lib/Files/Storage/Wrapper/JailTest.php index f7babfb609d..0043e37ba33 100644 --- a/tests/lib/Files/Storage/Wrapper/JailTest.php +++ b/tests/lib/Files/Storage/Wrapper/JailTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -13,7 +14,7 @@ use OC\Files\Storage\Wrapper\Jail; class JailTest extends \Test\Files\Storage\Storage { /** - * @var \OC\Files\Storage\Temporary + * @var Temporary */ private $sourceStorage; diff --git a/tests/lib/Files/Storage/Wrapper/KnownMtimeTest.php b/tests/lib/Files/Storage/Wrapper/KnownMtimeTest.php index bbeb48c5cef..b1b5582b4ed 100644 --- a/tests/lib/Files/Storage/Wrapper/KnownMtimeTest.php +++ b/tests/lib/Files/Storage/Wrapper/KnownMtimeTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php b/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php index 003842dbbc2..a2f3460c58c 100644 --- a/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php +++ b/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -18,7 +19,7 @@ use OCP\Files\Cache\IScanner; */ class PermissionsMaskTest extends \Test\Files\Storage\Storage { /** - * @var \OC\Files\Storage\Temporary + * @var Temporary */ private $sourceStorage; diff --git a/tests/lib/Files/Storage/Wrapper/QuotaTest.php b/tests/lib/Files/Storage/Wrapper/QuotaTest.php index b2bcdfa32d8..2878fe6ca92 100644 --- a/tests/lib/Files/Storage/Wrapper/QuotaTest.php +++ b/tests/lib/Files/Storage/Wrapper/QuotaTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Storage/Wrapper/WrapperTest.php b/tests/lib/Files/Storage/Wrapper/WrapperTest.php index d7b7683c58a..60f139450c7 100644 --- a/tests/lib/Files/Storage/Wrapper/WrapperTest.php +++ b/tests/lib/Files/Storage/Wrapper/WrapperTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Stream/DummyEncryptionWrapper.php b/tests/lib/Files/Stream/DummyEncryptionWrapper.php index 6846762cb67..89904e6de73 100644 --- a/tests/lib/Files/Stream/DummyEncryptionWrapper.php +++ b/tests/lib/Files/Stream/DummyEncryptionWrapper.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Stream/EncryptionTest.php b/tests/lib/Files/Stream/EncryptionTest.php index c676358ad71..62eaab3cc7e 100644 --- a/tests/lib/Files/Stream/EncryptionTest.php +++ b/tests/lib/Files/Stream/EncryptionTest.php @@ -101,9 +101,7 @@ class EncryptionTest extends \Test\TestCase { ); } - /** - * @dataProvider dataProviderStreamOpen() - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderStreamOpen')] public function testStreamOpen( $isMasterKeyUsed, $mode, @@ -277,9 +275,7 @@ class EncryptionTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataFilesProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFilesProvider')] public function testWriteReadBigFile($testFile): void { $expectedData = file_get_contents(\OC::$SERVERROOT . '/tests/data/' . $testFile); // write it @@ -314,9 +310,8 @@ class EncryptionTest extends \Test\TestCase { /** * simulate a non-seekable storage - * - * @dataProvider dataFilesProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFilesProvider')] public function testWriteToNonSeekableStorage($testFile): void { $wrapper = $this->getMockBuilder(Encryption::class) ->onlyMethods(['parentStreamSeek']) diff --git a/tests/lib/Files/Stream/HashWrapperTest.php b/tests/lib/Files/Stream/HashWrapperTest.php index 66dee77b607..459bc5c4318 100644 --- a/tests/lib/Files/Stream/HashWrapperTest.php +++ b/tests/lib/Files/Stream/HashWrapperTest.php @@ -12,9 +12,7 @@ use OC\Files\Stream\HashWrapper; use Test\TestCase; class HashWrapperTest extends TestCase { - /** - * @dataProvider hashProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('hashProvider')] public function testHashStream($data, string $algo, string $hash): void { if (!is_resource($data)) { $tmpData = fopen('php://temp', 'r+'); diff --git a/tests/lib/Files/Stream/QuotaTest.php b/tests/lib/Files/Stream/QuotaTest.php index 31c0f6c1453..4248d14f5a1 100644 --- a/tests/lib/Files/Stream/QuotaTest.php +++ b/tests/lib/Files/Stream/QuotaTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Type/DetectionTest.php b/tests/lib/Files/Type/DetectionTest.php index 81fb7ad4bcb..c30b21de401 100644 --- a/tests/lib/Files/Type/DetectionTest.php +++ b/tests/lib/Files/Type/DetectionTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -46,11 +47,11 @@ class DetectionTest extends \Test\TestCase { } /** - * @dataProvider dataDetectPath * * @param string $path * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataDetectPath')] public function testDetectPath(string $path, string $expected): void { $this->assertEquals($expected, $this->detection->detectPath($path)); } @@ -66,11 +67,11 @@ class DetectionTest extends \Test\TestCase { } /** - * @dataProvider dataDetectContent * * @param string $path * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataDetectContent')] public function testDetectContent(string $path, string $expected): void { $this->assertEquals($expected, $this->detection->detectContent(\OC::$SERVERROOT . '/tests/data' . $path)); } @@ -86,11 +87,11 @@ class DetectionTest extends \Test\TestCase { } /** - * @dataProvider dataDetect * * @param string $path * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataDetect')] public function testDetect(string $path, string $expected): void { $this->assertEquals($expected, $this->detection->detect(\OC::$SERVERROOT . '/tests/data' . $path)); } @@ -110,11 +111,11 @@ class DetectionTest extends \Test\TestCase { } /** - * @dataProvider dataMimeTypeCustom * * @param string $ext * @param string $mime */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataMimeTypeCustom')] public function testDetectMimeTypeCustom(string $ext, string $mime): void { $confDir = sys_get_temp_dir(); file_put_contents($confDir . '/mimetypemapping.dist.json', json_encode([])); @@ -144,11 +145,11 @@ class DetectionTest extends \Test\TestCase { } /** - * @dataProvider dataGetSecureMimeType * * @param string $mimeType * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetSecureMimeType')] public function testGetSecureMimeType(string $mimeType, string $expected): void { $this->assertEquals($expected, $this->detection->getSecureMimeType($mimeType)); } diff --git a/tests/lib/Files/Type/LoaderTest.php b/tests/lib/Files/Type/LoaderTest.php index f1018093c45..44745a50dc0 100644 --- a/tests/lib/Files/Type/LoaderTest.php +++ b/tests/lib/Files/Type/LoaderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Files/Utils/ScannerTest.php b/tests/lib/Files/Utils/ScannerTest.php index ebad4680ff6..49399ef70a6 100644 --- a/tests/lib/Files/Utils/ScannerTest.php +++ b/tests/lib/Files/Utils/ScannerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -23,12 +24,12 @@ use Psr\Log\LoggerInterface; class TestScanner extends Scanner { /** - * @var \OC\Files\Mount\MountPoint[] $mounts + * @var MountPoint[] $mounts */ private $mounts = []; /** - * @param \OC\Files\Mount\MountPoint $mount + * @param MountPoint $mount */ public function addMount($mount) { $this->mounts[] = $mount; @@ -158,9 +159,9 @@ class ScannerTest extends \Test\TestCase { } /** - * @dataProvider invalidPathProvider * @param string $invalidPath */ + #[\PHPUnit\Framework\Attributes\DataProvider('invalidPathProvider')] public function testInvalidPathScanning($invalidPath): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Invalid path to scan'); diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 36e448ea6e2..c490cd08dae 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -32,8 +33,10 @@ use OCP\Files\Storage\IStorage; use OCP\Files\Storage\IStorageFactory; use OCP\IConfig; use OCP\IDBConnection; +use OCP\IGroup; use OCP\IGroupManager; use OCP\ITempManager; +use OCP\IUser; use OCP\IUserManager; use OCP\Lock\ILockingProvider; use OCP\Lock\LockedException; @@ -94,7 +97,7 @@ class ViewTest extends \Test\TestCase { use UserTrait; /** - * @var \OC\Files\Storage\Storage[] $storages + * @var Storage[] $storages */ private $storages = []; @@ -104,16 +107,16 @@ class ViewTest extends \Test\TestCase { private $user; /** - * @var \OCP\IUser + * @var IUser */ private $userObject; /** - * @var \OCP\IGroup + * @var IGroup */ private $groupObject; - /** @var \OC\Files\Storage\Storage */ + /** @var Storage */ private $tempStorage; protected function setUp(): void { @@ -317,9 +320,7 @@ class ViewTest extends \Test\TestCase { ]; } - /** - * @dataProvider sharingDisabledPermissionProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('sharingDisabledPermissionProvider')] public function testRemoveSharePermissionWhenSharingDisabledForUser($excludeGroups, $excludeGroupsList, $expectedShareable): void { // Reset sharing disabled for users cache self::invokePrivate(Server::get(ShareDisableChecker::class), 'sharingDisabledForUsersCache', [new CappedMemoryCache()]); @@ -566,9 +567,7 @@ class ViewTest extends \Test\TestCase { return [['rmdir'], ['unlink']]; } - /** - * @dataProvider rmdirOrUnlinkDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('rmdirOrUnlinkDataProvider')] public function testRmdir($method): void { $storage1 = $this->getTestStorage(); Filesystem::mount($storage1, [], '/'); @@ -689,11 +688,11 @@ class ViewTest extends \Test\TestCase { /** * @param bool $scan * @param string $class - * @return \OC\Files\Storage\Storage + * @return Storage */ private function getTestStorage($scan = true, $class = Temporary::class) { /** - * @var \OC\Files\Storage\Storage $storage + * @var Storage $storage */ $storage = new $class([]); $textData = "dummy file data\n"; @@ -775,9 +774,7 @@ class ViewTest extends \Test\TestCase { \OC_Hook::clear('OC_Filesystem', 'post_write'); } - /** - * @dataProvider resolvePathTestProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('resolvePathTestProvider')] public function testResolvePath($expected, $pathToTest): void { $storage1 = $this->getTestStorage(); Filesystem::mount($storage1, [], '/'); @@ -937,9 +934,7 @@ class ViewTest extends \Test\TestCase { $this->assertNotEquals($newFolderInfo->getEtag(), $oldEtag); } - /** - * @dataProvider absolutePathProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('absolutePathProvider')] public function testGetAbsolutePath($expectedPath, $relativePath): void { $view = new View('/files'); $this->assertEquals($expectedPath, $view->getAbsolutePath($relativePath)); @@ -973,9 +968,7 @@ class ViewTest extends \Test\TestCase { ]; } - /** - * @dataProvider chrootRelativePathProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('chrootRelativePathProvider')] public function testChrootGetRelativePath($root, $absolutePath, $expectedPath): void { $view = new View('/files'); $view->chroot($root); @@ -986,9 +979,7 @@ class ViewTest extends \Test\TestCase { return self::relativePathProvider('/'); } - /** - * @dataProvider initRelativePathProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('initRelativePathProvider')] public function testInitGetRelativePath($root, $absolutePath, $expectedPath): void { $view = new View($root); $this->assertEquals($expectedPath, $view->getRelativePath($absolutePath)); @@ -1085,9 +1076,7 @@ class ViewTest extends \Test\TestCase { $this->assertEquals('foo', $view->file_get_contents('')); } - /** - * @dataProvider tooLongPathDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('tooLongPathDataProvider')] public function testTooLongPath($operation, $param0 = null): void { $this->expectException(InvalidPathException::class); @@ -1273,9 +1262,9 @@ class ViewTest extends \Test\TestCase { } /** - * @dataProvider directoryTraversalProvider * @param string $root */ + #[\PHPUnit\Framework\Attributes\DataProvider('directoryTraversalProvider')] public function testConstructDirectoryTraversalException($root): void { $this->expectException(\Exception::class); @@ -1298,7 +1287,7 @@ class ViewTest extends \Test\TestCase { public function testSetMountOptionsInStorage(): void { $mount = new MountPoint(Temporary::class, '/asd/', [[]], Filesystem::getLoader(), ['foo' => 'bar']); Filesystem::getMountManager()->addMount($mount); - /** @var \OC\Files\Storage\Common $storage */ + /** @var Common $storage */ $storage = $mount->getStorage(); $this->assertEquals($storage->getMountOption('foo'), 'bar'); } @@ -1306,7 +1295,7 @@ class ViewTest extends \Test\TestCase { public function testSetMountOptionsWatcherPolicy(): void { $mount = new MountPoint(Temporary::class, '/asd/', [[]], Filesystem::getLoader(), ['filesystem_check_changes' => Watcher::CHECK_NEVER]); Filesystem::getMountManager()->addMount($mount); - /** @var \OC\Files\Storage\Common $storage */ + /** @var Common $storage */ $storage = $mount->getStorage(); $watcher = $storage->getWatcher(); $this->assertEquals(Watcher::CHECK_NEVER, $watcher->getPolicy()); @@ -1333,11 +1322,11 @@ class ViewTest extends \Test\TestCase { * e.g. reading from a folder that's being renamed * * - * @dataProvider dataLockPaths * * @param string $rootPath * @param string $pathPrefix */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataLockPaths')] public function testReadFromWriteLockedPath($rootPath, $pathPrefix): void { $this->expectException(LockedException::class); @@ -1354,11 +1343,11 @@ class ViewTest extends \Test\TestCase { /** * Reading from a files_encryption folder that's being renamed * - * @dataProvider dataLockPaths * * @param string $rootPath * @param string $pathPrefix */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataLockPaths')] public function testReadFromWriteUnlockablePath($rootPath, $pathPrefix): void { $rootPath = str_replace('{folder}', 'files_encryption', $rootPath); $pathPrefix = str_replace('{folder}', 'files_encryption', $pathPrefix); @@ -1374,11 +1363,11 @@ class ViewTest extends \Test\TestCase { * e.g. writing a file that's being downloaded * * - * @dataProvider dataLockPaths * * @param string $rootPath * @param string $pathPrefix */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataLockPaths')] public function testWriteToReadLockedFile($rootPath, $pathPrefix): void { $this->expectException(LockedException::class); @@ -1395,11 +1384,11 @@ class ViewTest extends \Test\TestCase { /** * Writing a file that's being downloaded * - * @dataProvider dataLockPaths * * @param string $rootPath * @param string $pathPrefix */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataLockPaths')] public function testWriteToReadUnlockableFile($rootPath, $pathPrefix): void { $rootPath = str_replace('{folder}', 'files_encryption', $rootPath); $pathPrefix = str_replace('{folder}', 'files_encryption', $pathPrefix); @@ -1522,9 +1511,7 @@ class ViewTest extends \Test\TestCase { ]; } - /** - * @dataProvider pathRelativeToFilesProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('pathRelativeToFilesProvider')] public function testGetPathRelativeToFiles($path, $expectedPath): void { $view = new View(); $this->assertEquals($expectedPath, $view->getPathRelativeToFiles($path)); @@ -1541,9 +1528,9 @@ class ViewTest extends \Test\TestCase { } /** - * @dataProvider pathRelativeToFilesProviderExceptionCases * @param string $path */ + #[\PHPUnit\Framework\Attributes\DataProvider('pathRelativeToFilesProviderExceptionCases')] public function testGetPathRelativeToFilesWithInvalidArgument($path): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('$absolutePath must be relative to "files"'); @@ -1586,11 +1573,11 @@ class ViewTest extends \Test\TestCase { } /** - * @dataProvider hookPathProvider * @param $root * @param $path * @param $shouldEmit */ + #[\PHPUnit\Framework\Attributes\DataProvider('hookPathProvider')] public function testHookPaths($root, $path, $shouldEmit): void { $filesystemReflection = new \ReflectionClass(Filesystem::class); $defaultRootValue = $filesystemReflection->getProperty('defaultInstance'); @@ -1925,7 +1912,6 @@ class ViewTest extends \Test\TestCase { /** * Test whether locks are set before and after the operation * - * @dataProvider basicOperationProviderForLocks * * @param string $operation operation name on the view * @param array $operationArgs arguments for the operation @@ -1937,6 +1923,7 @@ class ViewTest extends \Test\TestCase { * @param int $expectedStrayLock expected lock after returning, should * be null (unlock) for most operations */ + #[\PHPUnit\Framework\Attributes\DataProvider('basicOperationProviderForLocks')] public function testLockBasicOperation( $operation, $operationArgs, @@ -2086,12 +2073,12 @@ class ViewTest extends \Test\TestCase { /** * Test locks for fopen with fclose at the end * - * @dataProvider basicOperationProviderForLocks * * @param string $operation operation name on the view * @param array $operationArgs arguments for the operation * @param string $path path of the locked item to check */ + #[\PHPUnit\Framework\Attributes\DataProvider('basicOperationProviderForLocks')] public function testLockBasicOperationUnlocksAfterException( $operation, $operationArgs, @@ -2177,13 +2164,13 @@ class ViewTest extends \Test\TestCase { /** * Test locks for fopen with fclose at the end * - * @dataProvider basicOperationProviderForLocks * * @param string $operation operation name on the view * @param array $operationArgs arguments for the operation * @param string $path path of the locked item to check * @param string $hookType hook type */ + #[\PHPUnit\Framework\Attributes\DataProvider('basicOperationProviderForLocks')] public function testLockBasicOperationUnlocksAfterCancelledHook( $operation, $operationArgs, @@ -2222,12 +2209,12 @@ class ViewTest extends \Test\TestCase { /** * Test locks for rename or copy operation * - * @dataProvider lockFileRenameOrCopyDataProvider * * @param string $operation operation to be done on the view * @param int $expectedLockTypeSourceDuring expected lock type on source file during * the operation */ + #[\PHPUnit\Framework\Attributes\DataProvider('lockFileRenameOrCopyDataProvider')] public function testLockFileRename($operation, $expectedLockTypeSourceDuring): void { $view = new View('/' . $this->user . '/files/'); @@ -2412,13 +2399,13 @@ class ViewTest extends \Test\TestCase { /** * Test locks for rename or copy operation cross-storage * - * @dataProvider lockFileRenameOrCopyCrossStorageDataProvider * * @param string $viewOperation operation to be done on the view * @param string $storageOperation operation to be mocked on the storage * @param int $expectedLockTypeSourceDuring expected lock type on source file during * the operation */ + #[\PHPUnit\Framework\Attributes\DataProvider('lockFileRenameOrCopyCrossStorageDataProvider')] public function testLockFileRenameCrossStorage($viewOperation, $storageOperation, $expectedLockTypeSourceDuring): void { $view = new View('/' . $this->user . '/files/'); @@ -2680,8 +2667,8 @@ class ViewTest extends \Test\TestCase { /** * @param string $filter * @param string[] $expected - * @dataProvider mimeFilterProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('mimeFilterProvider')] public function testGetDirectoryContentMimeFilter($filter, $expected): void { $storage1 = new Temporary(); $root = self::getUniqueID('/'); diff --git a/tests/lib/GlobalScale/ConfigTest.php b/tests/lib/GlobalScale/ConfigTest.php index b6c77c9ddf1..447b5886ce3 100644 --- a/tests/lib/GlobalScale/ConfigTest.php +++ b/tests/lib/GlobalScale/ConfigTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -47,12 +48,12 @@ class ConfigTest extends TestCase { /** - * @dataProvider dataTestOnlyInternalFederation * * @param bool $gsEnabled * @param string $gsFederation * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestOnlyInternalFederation')] public function testOnlyInternalFederation($gsEnabled, $gsFederation, $expected): void { $gsConfig = $this->getInstance(['isGlobalScaleEnabled']); diff --git a/tests/lib/Group/Backend.php b/tests/lib/Group/Backend.php index b55e51b72a4..3c068d8d64b 100644 --- a/tests/lib/Group/Backend.php +++ b/tests/lib/Group/Backend.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Group/DatabaseTest.php b/tests/lib/Group/DatabaseTest.php index d748890b4de..ee6b4156040 100644 --- a/tests/lib/Group/DatabaseTest.php +++ b/tests/lib/Group/DatabaseTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Group/Dummy.php b/tests/lib/Group/Dummy.php index 4ba885c6cdd..5f2a81cf0aa 100644 --- a/tests/lib/Group/Dummy.php +++ b/tests/lib/Group/Dummy.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php index e52e0733501..8515ef0e3e8 100644 --- a/tests/lib/Group/ManagerTest.php +++ b/tests/lib/Group/ManagerTest.php @@ -71,12 +71,12 @@ class ManagerTest extends TestCase { */ private function getTestBackend($implementedActions = null) { if ($implementedActions === null) { - $implementedActions = - GroupInterface::ADD_TO_GROUP | - GroupInterface::REMOVE_FROM_GOUP | - GroupInterface::COUNT_USERS | - GroupInterface::CREATE_GROUP | - GroupInterface::DELETE_GROUP; + $implementedActions + = GroupInterface::ADD_TO_GROUP + | GroupInterface::REMOVE_FROM_GOUP + | GroupInterface::COUNT_USERS + | GroupInterface::CREATE_GROUP + | GroupInterface::DELETE_GROUP; } // need to declare it this way due to optional methods // thanks to the implementsActions logic @@ -213,12 +213,12 @@ class ManagerTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Group\Backend $backend */ $backendGroupCreated = false; $backend = $this->getTestBackend( - GroupInterface::ADD_TO_GROUP | - GroupInterface::REMOVE_FROM_GOUP | - GroupInterface::COUNT_USERS | - GroupInterface::CREATE_GROUP | - GroupInterface::DELETE_GROUP | - GroupInterface::GROUP_DETAILS + GroupInterface::ADD_TO_GROUP + | GroupInterface::REMOVE_FROM_GOUP + | GroupInterface::COUNT_USERS + | GroupInterface::CREATE_GROUP + | GroupInterface::DELETE_GROUP + | GroupInterface::GROUP_DETAILS ); $backend->expects($this->any()) ->method('groupExists') @@ -242,12 +242,12 @@ class ManagerTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Group\Backend $backend */ $backendGroupCreated = false; $backend = $this->getTestBackend( - GroupInterface::ADD_TO_GROUP | - GroupInterface::REMOVE_FROM_GOUP | - GroupInterface::COUNT_USERS | - GroupInterface::CREATE_GROUP | - GroupInterface::DELETE_GROUP | - GroupInterface::GROUP_DETAILS + GroupInterface::ADD_TO_GROUP + | GroupInterface::REMOVE_FROM_GOUP + | GroupInterface::COUNT_USERS + | GroupInterface::CREATE_GROUP + | GroupInterface::DELETE_GROUP + | GroupInterface::GROUP_DETAILS ); $groupName = str_repeat('x', 256); $backend->expects($this->any()) @@ -452,7 +452,7 @@ class ManagerTest extends TestCase { $manager = new \OC\Group\Manager($this->userManager, $this->dispatcher, $this->logger, $this->cache, $this->remoteIpAddress); $manager->addBackend($backend); - /** @var \OC\User\User|\PHPUnit\Framework\MockObject\MockObject $user */ + /** @var User|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $user->method('getUID') ->willReturn('myUID'); @@ -482,7 +482,7 @@ class ManagerTest extends TestCase { $manager = new \OC\Group\Manager($this->userManager, $this->dispatcher, $this->logger, $this->cache, $this->remoteIpAddress); $manager->addBackend($backend); - /** @var \OC\User\User|\PHPUnit\Framework\MockObject\MockObject $user */ + /** @var User|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $user->expects($this->atLeastOnce()) ->method('getUID') @@ -955,12 +955,12 @@ class ManagerTest extends TestCase { * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend( - GroupInterface::ADD_TO_GROUP | - GroupInterface::REMOVE_FROM_GOUP | - GroupInterface::COUNT_USERS | - GroupInterface::CREATE_GROUP | - GroupInterface::DELETE_GROUP | - GroupInterface::GROUP_DETAILS + GroupInterface::ADD_TO_GROUP + | GroupInterface::REMOVE_FROM_GOUP + | GroupInterface::COUNT_USERS + | GroupInterface::CREATE_GROUP + | GroupInterface::DELETE_GROUP + | GroupInterface::GROUP_DETAILS ); $backend->expects($this->any()) ->method('getGroupDetails') diff --git a/tests/lib/Group/MetaDataTest.php b/tests/lib/Group/MetaDataTest.php index 1b58432fd88..dee59eab8da 100644 --- a/tests/lib/Group/MetaDataTest.php +++ b/tests/lib/Group/MetaDataTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/HelperStorageTest.php b/tests/lib/HelperStorageTest.php index b3474a25b9b..140be04ec64 100644 --- a/tests/lib/HelperStorageTest.php +++ b/tests/lib/HelperStorageTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -8,6 +9,7 @@ namespace Test; use OC\Files\Filesystem; +use OC\Files\Storage\Storage; use OC\Files\Storage\Temporary; use OC\Files\Storage\Wrapper\Quota; use OCP\Files\Mount\IMountManager; @@ -25,9 +27,9 @@ class HelperStorageTest extends \Test\TestCase { /** @var string */ private $user; - /** @var \OC\Files\Storage\Storage */ + /** @var Storage */ private $storageMock; - /** @var \OC\Files\Storage\Storage */ + /** @var Storage */ private $storage; private bool $savedQuotaIncludeExternalStorage; @@ -70,7 +72,7 @@ class HelperStorageTest extends \Test\TestCase { * free space * * @param int $freeSpace free space value - * @return \OC\Files\Storage\Storage + * @return Storage */ private function getStorageMock($freeSpace = 12) { $this->storageMock = $this->getMockBuilder(Temporary::class) diff --git a/tests/lib/HookHelper.php b/tests/lib/HookHelper.php index ce3cb073047..19eca59ac80 100644 --- a/tests/lib/HookHelper.php +++ b/tests/lib/HookHelper.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Hooks/BasicEmitterTest.php b/tests/lib/Hooks/BasicEmitterTest.php index 49845eb2fa9..6c00da2eaa3 100644 --- a/tests/lib/Hooks/BasicEmitterTest.php +++ b/tests/lib/Hooks/BasicEmitterTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -8,6 +9,7 @@ namespace Test\Hooks; use OC\Hooks\BasicEmitter; +use OC\Hooks\Emitter; /** * Class DummyEmitter @@ -34,7 +36,7 @@ class EmittedException extends \Exception { class BasicEmitterTest extends \Test\TestCase { /** - * @var \OC\Hooks\Emitter $emitter + * @var Emitter $emitter */ protected $emitter; diff --git a/tests/lib/Http/Client/ClientTest.php b/tests/lib/Http/Client/ClientTest.php index 2c0f982c51c..e76b66b52d7 100644 --- a/tests/lib/Http/Client/ClientTest.php +++ b/tests/lib/Http/Client/ClientTest.php @@ -151,9 +151,9 @@ class ClientTest extends \Test\TestCase { } /** - * @dataProvider dataPreventLocalAddress * @param string $uri */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPreventLocalAddress')] public function testPreventLocalAddressDisabledByGlobalConfig(string $uri): void { $this->config->expects($this->once()) ->method('getSystemValueBool') @@ -164,9 +164,9 @@ class ClientTest extends \Test\TestCase { } /** - * @dataProvider dataPreventLocalAddress * @param string $uri */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPreventLocalAddress')] public function testPreventLocalAddressDisabledByOption(string $uri): void { $this->config->expects($this->never()) ->method('getSystemValueBool'); @@ -177,9 +177,9 @@ class ClientTest extends \Test\TestCase { } /** - * @dataProvider dataPreventLocalAddress * @param string $uri */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPreventLocalAddress')] public function testPreventLocalAddressOnGet(string $uri): void { $host = parse_url($uri, PHP_URL_HOST); $this->expectException(LocalServerException::class); @@ -192,9 +192,9 @@ class ClientTest extends \Test\TestCase { } /** - * @dataProvider dataPreventLocalAddress * @param string $uri */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPreventLocalAddress')] public function testPreventLocalAddressOnHead(string $uri): void { $host = parse_url($uri, PHP_URL_HOST); $this->expectException(LocalServerException::class); @@ -207,9 +207,9 @@ class ClientTest extends \Test\TestCase { } /** - * @dataProvider dataPreventLocalAddress * @param string $uri */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPreventLocalAddress')] public function testPreventLocalAddressOnPost(string $uri): void { $host = parse_url($uri, PHP_URL_HOST); $this->expectException(LocalServerException::class); @@ -222,9 +222,9 @@ class ClientTest extends \Test\TestCase { } /** - * @dataProvider dataPreventLocalAddress * @param string $uri */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPreventLocalAddress')] public function testPreventLocalAddressOnPut(string $uri): void { $host = parse_url($uri, PHP_URL_HOST); $this->expectException(LocalServerException::class); @@ -237,9 +237,9 @@ class ClientTest extends \Test\TestCase { } /** - * @dataProvider dataPreventLocalAddress * @param string $uri */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPreventLocalAddress')] public function testPreventLocalAddressOnDelete(string $uri): void { $host = parse_url($uri, PHP_URL_HOST); $this->expectException(LocalServerException::class); diff --git a/tests/lib/Http/Client/NegativeDnsCacheTest.php b/tests/lib/Http/Client/NegativeDnsCacheTest.php index ba91e95a906..eb0f86f5c7a 100644 --- a/tests/lib/Http/Client/NegativeDnsCacheTest.php +++ b/tests/lib/Http/Client/NegativeDnsCacheTest.php @@ -30,7 +30,7 @@ class NegativeDnsCacheTest extends \Test\TestCase { ->method('createLocal') ->with('NegativeDnsCache') ->willReturn($this->cache); - + $this->negativeDnsCache = new NegativeDnsCache($this->cacheFactory); } diff --git a/tests/lib/Http/Client/ResponseTest.php b/tests/lib/Http/Client/ResponseTest.php index 291dc287148..1acf1eb1cbd 100644 --- a/tests/lib/Http/Client/ResponseTest.php +++ b/tests/lib/Http/Client/ResponseTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/ImageTest.php b/tests/lib/ImageTest.php index 494f616ac9c..02181fffff9 100644 --- a/tests/lib/ImageTest.php +++ b/tests/lib/ImageTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -280,12 +281,12 @@ class ImageTest extends \Test\TestCase { } /** - * @dataProvider sampleProvider * * @param string $filename * @param int[] $asked * @param int[] $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('sampleProvider')] public function testFitIn($filename, $asked, $expected): void { $img = new Image(); $img->loadFromFile(OC::$SERVERROOT . '/tests/data/' . $filename); @@ -305,10 +306,10 @@ class ImageTest extends \Test\TestCase { /** * Image should not be resized if it's already smaller than what is required * - * @dataProvider sampleFilenamesProvider * * @param string $filename */ + #[\PHPUnit\Framework\Attributes\DataProvider('sampleFilenamesProvider')] public function testScaleDownToFitWhenSmallerAlready($filename): void { $img = new Image(); $img->loadFromFile(OC::$SERVERROOT . '/tests/data/' . $filename); @@ -336,12 +337,12 @@ class ImageTest extends \Test\TestCase { } /** - * @dataProvider largeSampleProvider * * @param string $filename * @param int[] $asked * @param int[] $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('largeSampleProvider')] public function testScaleDownWhenBigger($filename, $asked, $expected): void { $img = new Image(); $img->loadFromFile(OC::$SERVERROOT . '/tests/data/' . $filename); @@ -359,9 +360,7 @@ class ImageTest extends \Test\TestCase { ]; } - /** - * @dataProvider convertDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('convertDataProvider')] public function testConvert($mimeType): void { $img = new Image(); $img->loadFromFile(OC::$SERVERROOT . '/tests/data/testimage.png'); diff --git a/tests/lib/InfoXmlTest.php b/tests/lib/InfoXmlTest.php index 151b629f50b..e92ee5b9c09 100644 --- a/tests/lib/InfoXmlTest.php +++ b/tests/lib/InfoXmlTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -49,10 +50,9 @@ class InfoXmlTest extends TestCase { } /** - * @dataProvider dataApps - * * @param string $app */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataApps')] public function testClasses($app): void { $appInfo = $this->appManager->getAppInfo($app); $appPath = $this->appManager->getAppPath($app); diff --git a/tests/lib/InitialStateServiceTest.php b/tests/lib/InitialStateServiceTest.php index 5e0f7c7b55e..9081aa93b84 100644 --- a/tests/lib/InitialStateServiceTest.php +++ b/tests/lib/InitialStateServiceTest.php @@ -49,9 +49,7 @@ class InitialStateServiceTest extends TestCase { ]; } - /** - * @dataProvider staticData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('staticData')] public function testStaticData(mixed $value): void { $this->service->provideInitialState('test', 'key', $value); $data = $this->service->getInitialStates(); @@ -88,9 +86,7 @@ class InitialStateServiceTest extends TestCase { ); } - /** - * @dataProvider staticData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('staticData')] public function testLazyData(mixed $value): void { $this->service->provideLazyInitialState('test', 'key', function () use ($value) { return $value; diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php index c05c65cba85..1813d2cd151 100644 --- a/tests/lib/InstallerTest.php +++ b/tests/lib/InstallerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -146,10 +147,10 @@ class InstallerTest extends TestCase { } /** - * @dataProvider updateArrayProvider * @param array $appArray * @param string|bool $updateAvailable */ + #[\PHPUnit\Framework\Attributes\DataProvider('updateArrayProvider')] public function testIsUpdateAvailable(array $appArray, $updateAvailable): void { $this->appFetcher ->expects($this->once()) diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index fc540707c70..a8a2596a3d8 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -1078,8 +1079,8 @@ class CheckerTest extends TestCase { /** * @param string $channel * @param bool $isCodeSigningEnforced - * @dataProvider channelDataProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('channelDataProvider')] public function testIsCodeCheckEnforced($channel, $isCodeSigningEnforced): void { $this->serverVersion ->expects($this->once()) @@ -1096,8 +1097,8 @@ class CheckerTest extends TestCase { /** * @param string $channel - * @dataProvider channelDataProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('channelDataProvider')] public function testIsCodeCheckEnforcedWithDisabledConfigSwitch($channel): void { $this->serverVersion ->expects($this->once()) diff --git a/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php b/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php index 6d3006bb3c4..837b397ac1f 100644 --- a/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php +++ b/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -23,7 +24,7 @@ class AppLocatorTest extends TestCase { $this->assertSame(\OC_App::getAppPath('files'), $this->locator->getAppPath('files')); } - + public function testGetAppPathNotExistentApp(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('App not found'); diff --git a/tests/lib/IntegrityCheck/Helpers/EnvironmentHelperTest.php b/tests/lib/IntegrityCheck/Helpers/EnvironmentHelperTest.php index 379eb178b06..caa5ed2e782 100644 --- a/tests/lib/IntegrityCheck/Helpers/EnvironmentHelperTest.php +++ b/tests/lib/IntegrityCheck/Helpers/EnvironmentHelperTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php b/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php index ef537155388..b8bec35328d 100644 --- a/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php +++ b/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -30,7 +31,7 @@ class FileAccessHelperTest extends TestCase { $this->assertSame($data, $this->fileAccessHelper->file_get_contents($filePath)); } - + public function testFile_put_contentsWithException(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Failed to write into /anabsolutelynotexistingfolder/on/the/system.txt'); @@ -43,7 +44,7 @@ class FileAccessHelperTest extends TestCase { $this->assertTrue($this->fileAccessHelper->is_writable(Server::get(ITempManager::class)->getTemporaryFile('MyFile'))); } - + public function testAssertDirectoryExistsWithException(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Directory /anabsolutelynotexistingfolder/on/the/system does not exist.'); diff --git a/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php b/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php index 1d0b3e4f24d..dfd0941bd20 100644 --- a/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php +++ b/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2015 ownCloud, Inc. @@ -35,10 +36,10 @@ class ExcludeFileByNameFilterIteratorTest extends TestCase { } /** - * @dataProvider fileNameProvider * @param string $fileName * @param bool $expectedResult */ + #[\PHPUnit\Framework\Attributes\DataProvider('fileNameProvider')] public function testAcceptForFiles($fileName, $expectedResult): void { $iteratorMock = $this->getMockBuilder(\RecursiveDirectoryIterator::class) ->disableOriginalConstructor() @@ -57,10 +58,10 @@ class ExcludeFileByNameFilterIteratorTest extends TestCase { } /** - * @dataProvider fileNameProvider * @param string $fileName * @param bool $expectedResult */ + #[\PHPUnit\Framework\Attributes\DataProvider('fileNameProvider')] public function testAcceptForDirs($fileName, $expectedResult): void { $iteratorMock = $this->getMockBuilder(\RecursiveDirectoryIterator::class) ->disableOriginalConstructor() diff --git a/tests/lib/L10N/FactoryTest.php b/tests/lib/L10N/FactoryTest.php index cd66217c49d..8c15baba9f6 100644 --- a/tests/lib/L10N/FactoryTest.php +++ b/tests/lib/L10N/FactoryTest.php @@ -278,10 +278,9 @@ class FactoryTest extends TestCase { } /** - * @dataProvider dataFindAvailableLanguages - * * @param string|null $app */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFindAvailableLanguages')] public function testFindAvailableLanguages($app): void { $factory = $this->getFactory(['findL10nDir']); $factory->expects(self::once()) @@ -324,13 +323,13 @@ class FactoryTest extends TestCase { } /** - * @dataProvider dataLanguageExists * * @param string|null $app * @param string $lang * @param string[] $availableLanguages * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataLanguageExists')] public function testLanguageExists($app, $lang, array $availableLanguages, $expected): void { $factory = $this->getFactory(['findAvailableLanguages']); $factory->expects(($lang === 'en') ? self::never() : self::once()) @@ -364,13 +363,13 @@ class FactoryTest extends TestCase { } /** - * @dataProvider dataSetLanguageFromRequest * * @param string|null $app * @param string $header * @param string[] $availableLanguages * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetLanguageFromRequest')] public function testGetLanguageFromRequest($app, $header, array $availableLanguages, $expected): void { $factory = $this->getFactory(['findAvailableLanguages', 'respectDefaultLanguage']); $factory->expects(self::once()) @@ -409,11 +408,11 @@ class FactoryTest extends TestCase { } /** - * @dataProvider dataGetL10nFilesForApp * * @param string $app * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetL10nFilesForApp')] public function testGetL10nFilesForApp($app, $lang, $expected): void { $factory = $this->getFactory(); if (in_array($app, ['settings','files'])) { @@ -442,11 +441,11 @@ class FactoryTest extends TestCase { } /** - * @dataProvider dataFindL10NDir * * @param string $app * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFindL10NDir')] public function testFindL10NDir($app, $expected): void { $factory = $this->getFactory(); if (in_array($app, ['settings','files'])) { @@ -479,12 +478,12 @@ class FactoryTest extends TestCase { } /** - * @dataProvider dataFindLanguage * * @param bool $loggedIn * @param array $availableLang * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFindLanguage')] public function testFindLanguage($loggedIn, $availableLang, $expected): void { $userLang = 'nl'; $browserLang = 'de'; @@ -671,13 +670,13 @@ class FactoryTest extends TestCase { /** * test if we respect default language if possible * - * @dataProvider dataTestRespectDefaultLanguage * * @param string $lang * @param string $defaultLanguage * @param bool $langExists * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestRespectDefaultLanguage')] public function testRespectDefaultLanguage($lang, $defaultLanguage, $langExists, $expected): void { $factory = $this->getFactory(['languageExists']); $factory->expects(self::any()) @@ -703,13 +702,13 @@ class FactoryTest extends TestCase { * - if available languages set is not reduced to an empty set if * the reduce config is an empty set * - * @dataProvider dataTestReduceToLanguages * * @param string $lang * @param array $availableLanguages * @param array $reducedLanguageSet * @param array $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestReduceToLanguages')] public function testReduceLanguagesByConfiguration(string $lang, array $availableLanguages, array $reducedLanguageSet, array $expected): void { $factory = $this->getFactory(['findAvailableLanguages', 'languageExists']); $factory->expects(self::any()) @@ -744,9 +743,7 @@ class FactoryTest extends TestCase { ]; } - /** - * @dataProvider languageIteratorRequestProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('languageIteratorRequestProvider')] public function testGetLanguageIterator(bool $hasSession, bool $mockUser): void { $factory = $this->getFactory(); $user = null; @@ -777,9 +774,7 @@ class FactoryTest extends TestCase { ]; } - /** - * @dataProvider dataGetLanguageDirection - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetLanguageDirection')] public function testGetLanguageDirection(string $language, string $expectedDirection) { $factory = $this->getFactory(); diff --git a/tests/lib/L10N/L10nTest.php b/tests/lib/L10N/L10nTest.php index 4b934661f76..842f1bc5eda 100644 --- a/tests/lib/L10N/L10nTest.php +++ b/tests/lib/L10N/L10nTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -30,9 +31,9 @@ class L10nTest extends TestCase { * @return Factory */ protected function getFactory() { - /** @var \OCP\IConfig $config */ + /** @var IConfig $config */ $config = $this->createMock(IConfig::class); - /** @var \OCP\IRequest $request */ + /** @var IRequest $request */ $request = $this->createMock(IRequest::class); /** @var IUserSession $userSession */ $userSession = $this->createMock(IUserSession::class); @@ -107,11 +108,11 @@ class L10nTest extends TestCase { } /** - * @dataProvider dataPlaceholders * * @param $string * @param $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPlaceholders')] public function testPlaceholders($string, $expected): void { $transFile = \OC::$SERVERROOT . '/tests/data/l10n/de.json'; $l = new L10N($this->getFactory(), 'test', 'de', 'de_AT', [$transFile]); @@ -155,9 +156,7 @@ class L10nTest extends TestCase { ]; } - /** - * @dataProvider localizationData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('localizationData')] public function testNumericStringLocalization($expectedDate, $lang, $locale, $type, $value): void { $l = new L10N($this->getFactory(), 'test', $lang, $locale, []); $this->assertSame($expectedDate, $l->l($type, $value)); @@ -171,11 +170,11 @@ class L10nTest extends TestCase { } /** - * @dataProvider firstDayData * @param $expected * @param $lang * @param $locale */ + #[\PHPUnit\Framework\Attributes\DataProvider('firstDayData')] public function testFirstWeekDay($expected, $lang, $locale): void { $l = new L10N($this->getFactory(), 'test', $lang, $locale, []); $this->assertSame($expected, $l->l('firstday', 'firstday')); @@ -189,11 +188,11 @@ class L10nTest extends TestCase { } /** - * @dataProvider jsDateData * @param $expected * @param $lang * @param $locale */ + #[\PHPUnit\Framework\Attributes\DataProvider('jsDateData')] public function testJSDate($expected, $lang, $locale): void { $l = new L10N($this->getFactory(), 'test', $lang, $locale, []); $this->assertSame($expected, $l->l('jsdate', 'jsdate')); @@ -215,10 +214,10 @@ class L10nTest extends TestCase { } /** - * @dataProvider findLanguageFromLocaleData * @param $locale * @param $language */ + #[\PHPUnit\Framework\Attributes\DataProvider('findLanguageFromLocaleData')] public function testFindLanguageFromLocale($locale, $language): void { $this->assertEquals( $language, diff --git a/tests/lib/L10N/LanguageIteratorTest.php b/tests/lib/L10N/LanguageIteratorTest.php index e328941e35d..4d1c666cc42 100644 --- a/tests/lib/L10N/LanguageIteratorTest.php +++ b/tests/lib/L10N/LanguageIteratorTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -57,9 +58,7 @@ class LanguageIteratorTest extends TestCase { ]; } - /** - * @dataProvider languageSettingsProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('languageSettingsProvider')] public function testIterator($forcedLang, $userLang, $sysLang, $expectedValues): void { $this->config->expects($this->any()) ->method('getSystemValue') diff --git a/tests/lib/LargeFileHelperGetFileSizeTest.php b/tests/lib/LargeFileHelperGetFileSizeTest.php index dbb8658d184..fbf22f1eb87 100644 --- a/tests/lib/LargeFileHelperGetFileSizeTest.php +++ b/tests/lib/LargeFileHelperGetFileSizeTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -38,9 +39,7 @@ class LargeFileHelperGetFileSizeTest extends TestCase { ]; } - /** - * @dataProvider dataFileNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFileNameProvider')] public function XtestGetFileSizeViaCurl($filename, $fileSize) { if (!extension_loaded('curl')) { $this->markTestSkipped( @@ -58,9 +57,7 @@ class LargeFileHelperGetFileSizeTest extends TestCase { ); } - /** - * @dataProvider dataFileNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFileNameProvider')] public function testGetFileSizeViaExec($filename, $fileSize): void { if (escapeshellarg('strรคngรฉ') !== '\'strรคngรฉ\'') { $this->markTestSkipped('Your escapeshell args removes accents'); @@ -76,9 +73,7 @@ class LargeFileHelperGetFileSizeTest extends TestCase { ); } - /** - * @dataProvider dataFileNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFileNameProvider')] public function testGetFileSizeNative($filename, $fileSize): void { $this->assertSame( $fileSize, diff --git a/tests/lib/LargeFileHelperTest.php b/tests/lib/LargeFileHelperTest.php index 0745c19f158..86d0c1387df 100644 --- a/tests/lib/LargeFileHelperTest.php +++ b/tests/lib/LargeFileHelperTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -38,7 +39,7 @@ class LargeFileHelperTest extends TestCase { ); } - + public function testFormatUnsignedIntegerStringException(): void { $this->expectException(\UnexpectedValueException::class); diff --git a/tests/lib/LegacyHelperTest.php b/tests/lib/LegacyHelperTest.php index 0938640b892..c18f929e40c 100644 --- a/tests/lib/LegacyHelperTest.php +++ b/tests/lib/LegacyHelperTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -115,9 +116,7 @@ class LegacyHelperTest extends \Test\TestCase { $this->assertEquals('dir/filename(1) (2) (4).ext', OC_Helper::buildNotExistingFileNameForView('dir', 'filename(1) (2) (3).ext', $viewMock)); } - /** - * @dataProvider streamCopyDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('streamCopyDataProvider')] public function testStreamCopy($expectedCount, $expectedResult, $source, $target): void { if (is_string($source)) { $source = fopen($source, 'r'); diff --git a/tests/lib/Lock/DBLockingProviderTest.php b/tests/lib/Lock/DBLockingProviderTest.php index 1216d42f343..32a223b4913 100644 --- a/tests/lib/Lock/DBLockingProviderTest.php +++ b/tests/lib/Lock/DBLockingProviderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -27,12 +28,12 @@ class DBLockingProviderTest extends LockingProvider { protected $instance; /** - * @var \OCP\IDBConnection + * @var IDBConnection */ protected $connection; /** - * @var \OCP\AppFramework\Utility\ITimeFactory + * @var ITimeFactory */ protected $timeFactory; @@ -50,7 +51,7 @@ class DBLockingProviderTest extends LockingProvider { } /** - * @return \OCP\Lock\ILockingProvider + * @return ILockingProvider */ protected function getInstance() { $this->connection = Server::get(IDBConnection::class); diff --git a/tests/lib/Lock/LockingProvider.php b/tests/lib/Lock/LockingProvider.php index 2f4407a8659..2827f2c9160 100644 --- a/tests/lib/Lock/LockingProvider.php +++ b/tests/lib/Lock/LockingProvider.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -13,12 +14,12 @@ use Test\TestCase; abstract class LockingProvider extends TestCase { /** - * @var \OCP\Lock\ILockingProvider + * @var ILockingProvider */ protected $instance; /** - * @return \OCP\Lock\ILockingProvider + * @return ILockingProvider */ abstract protected function getInstance(); @@ -59,7 +60,7 @@ abstract class LockingProvider extends TestCase { $this->assertFalse($this->instance->isLocked('foo', ILockingProvider::LOCK_SHARED)); } - + public function testDoubleExclusiveLock(): void { $this->expectException(LockedException::class); @@ -76,7 +77,7 @@ abstract class LockingProvider extends TestCase { $this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE); } - + public function testExclusiveLockAfterShared(): void { $this->expectException(LockedException::class); @@ -150,7 +151,7 @@ abstract class LockingProvider extends TestCase { } - + public function testSharedLockAfterExclusive(): void { $this->expectException(LockedException::class); @@ -197,7 +198,7 @@ abstract class LockingProvider extends TestCase { $this->assertTrue($this->instance->isLocked('foo', ILockingProvider::LOCK_SHARED)); } - + public function testChangeLockToExclusiveDoubleShared(): void { $this->expectException(LockedException::class); @@ -206,14 +207,14 @@ abstract class LockingProvider extends TestCase { $this->instance->changeLock('foo', ILockingProvider::LOCK_EXCLUSIVE); } - + public function testChangeLockToExclusiveNoShared(): void { $this->expectException(LockedException::class); $this->instance->changeLock('foo', ILockingProvider::LOCK_EXCLUSIVE); } - + public function testChangeLockToExclusiveFromExclusive(): void { $this->expectException(LockedException::class); @@ -221,14 +222,14 @@ abstract class LockingProvider extends TestCase { $this->instance->changeLock('foo', ILockingProvider::LOCK_EXCLUSIVE); } - + public function testChangeLockToSharedNoExclusive(): void { $this->expectException(LockedException::class); $this->instance->changeLock('foo', ILockingProvider::LOCK_SHARED); } - + public function testChangeLockToSharedFromShared(): void { $this->expectException(LockedException::class); diff --git a/tests/lib/Lock/MemcacheLockingProviderTest.php b/tests/lib/Lock/MemcacheLockingProviderTest.php index ec8ded11d1e..ea7b3c26b3c 100644 --- a/tests/lib/Lock/MemcacheLockingProviderTest.php +++ b/tests/lib/Lock/MemcacheLockingProviderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -10,16 +11,18 @@ namespace Test\Lock; use OC\Lock\MemcacheLockingProvider; use OC\Memcache\ArrayCache; use OCP\AppFramework\Utility\ITimeFactory; +use OCP\IMemcache; +use OCP\Lock\ILockingProvider; use OCP\Server; class MemcacheLockingProviderTest extends LockingProvider { /** - * @var \OCP\IMemcache + * @var IMemcache */ private $memcache; /** - * @return \OCP\Lock\ILockingProvider + * @return ILockingProvider */ protected function getInstance() { $this->memcache = new ArrayCache(); diff --git a/tests/lib/Lock/NonCachingDBLockingProviderTest.php b/tests/lib/Lock/NonCachingDBLockingProviderTest.php index ad4100a3afd..4f05f0ba892 100644 --- a/tests/lib/Lock/NonCachingDBLockingProviderTest.php +++ b/tests/lib/Lock/NonCachingDBLockingProviderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -18,7 +19,7 @@ use OCP\Server; */ class NonCachingDBLockingProviderTest extends DBLockingProviderTest { /** - * @return \OCP\Lock\ILockingProvider + * @return ILockingProvider */ protected function getInstance() { $this->connection = Server::get(IDBConnection::class); diff --git a/tests/lib/Lockdown/Filesystem/NoFSTest.php b/tests/lib/Lockdown/Filesystem/NoFSTest.php index ee6db48b47c..b471f573fb7 100644 --- a/tests/lib/Lockdown/Filesystem/NoFSTest.php +++ b/tests/lib/Lockdown/Filesystem/NoFSTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Lockdown/Filesystem/NullCacheTest.php b/tests/lib/Lockdown/Filesystem/NullCacheTest.php index 5e120e9bdc7..505951ea2ef 100644 --- a/tests/lib/Lockdown/Filesystem/NullCacheTest.php +++ b/tests/lib/Lockdown/Filesystem/NullCacheTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -27,7 +28,7 @@ class NulLCacheTest extends \Test\TestCase { } public function testGetEmpty(): void { - $this->assertNull($this->cache->get('foo')); + $this->assertFalse($this->cache->get('foo')); } public function testGet(): void { diff --git a/tests/lib/Lockdown/Filesystem/NullStorageTest.php b/tests/lib/Lockdown/Filesystem/NullStorageTest.php index 21cb0f75bb6..fa019ada4e5 100644 --- a/tests/lib/Lockdown/Filesystem/NullStorageTest.php +++ b/tests/lib/Lockdown/Filesystem/NullStorageTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Lockdown/LockdownManagerTest.php b/tests/lib/Lockdown/LockdownManagerTest.php index 1f747378c02..973dec6d1f2 100644 --- a/tests/lib/Lockdown/LockdownManagerTest.php +++ b/tests/lib/Lockdown/LockdownManagerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Log/FileTest.php b/tests/lib/Log/FileTest.php index 32ab4a1fdb6..3f030665fb4 100644 --- a/tests/lib/Log/FileTest.php +++ b/tests/lib/Log/FileTest.php @@ -1,4 +1,5 @@ <?php + /** * * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors diff --git a/tests/lib/Log/LogFactoryTest.php b/tests/lib/Log/LogFactoryTest.php index 1d87c856061..b1adbd0e823 100644 --- a/tests/lib/Log/LogFactoryTest.php +++ b/tests/lib/Log/LogFactoryTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -12,6 +13,7 @@ use OC\Log\LogFactory; use OC\Log\Syslog; use OC\Log\Systemdlog; use OC\SystemConfig; +use OCP\AppFramework\QueryException; use OCP\IServerContainer; use Test\TestCase; @@ -58,9 +60,9 @@ class LogFactoryTest extends TestCase { /** * @param string $type - * @dataProvider fileTypeProvider - * @throws \OCP\AppFramework\QueryException + * @throws QueryException */ + #[\PHPUnit\Framework\Attributes\DataProvider('fileTypeProvider')] public function testFile(string $type): void { $datadir = \OC::$SERVERROOT . '/data'; $defaultLog = $datadir . '/nextcloud.log'; @@ -91,9 +93,9 @@ class LogFactoryTest extends TestCase { } /** - * @dataProvider logFilePathProvider - * @throws \OCP\AppFramework\QueryException + * @throws QueryException */ + #[\PHPUnit\Framework\Attributes\DataProvider('logFilePathProvider')] public function testFileCustomPath($path, $expected): void { $datadir = \OC::$SERVERROOT . '/data'; $defaultLog = $datadir . '/nextcloud.log'; @@ -112,7 +114,7 @@ class LogFactoryTest extends TestCase { } /** - * @throws \OCP\AppFramework\QueryException + * @throws QueryException */ public function testErrorLog(): void { $log = $this->factory->get('errorlog'); @@ -120,7 +122,7 @@ class LogFactoryTest extends TestCase { } /** - * @throws \OCP\AppFramework\QueryException + * @throws QueryException */ public function testSystemLog(): void { $this->c->expects($this->once()) @@ -133,7 +135,7 @@ class LogFactoryTest extends TestCase { } /** - * @throws \OCP\AppFramework\QueryException + * @throws QueryException */ public function testSystemdLog(): void { $this->c->expects($this->once()) diff --git a/tests/lib/Log/PsrLoggerAdapterTest.php b/tests/lib/Log/PsrLoggerAdapterTest.php index 9a159ba537d..c11af7a12c2 100644 --- a/tests/lib/Log/PsrLoggerAdapterTest.php +++ b/tests/lib/Log/PsrLoggerAdapterTest.php @@ -28,9 +28,7 @@ class PsrLoggerAdapterTest extends TestCase { $this->loggerAdapter = new PsrLoggerAdapter($this->logger); } - /** - * @dataProvider dataPsrLoggingLevels - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPsrLoggingLevels')] public function testLoggingWithPsrLogLevels(string $level, int $expectedLevel): void { $this->logger->expects(self::once()) ->method('log') @@ -38,9 +36,7 @@ class PsrLoggerAdapterTest extends TestCase { $this->loggerAdapter->log($level, 'test message', ['app' => 'test']); } - /** - * @dataProvider dataPsrLoggingLevels - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataPsrLoggingLevels')] public function testLogLevelToInt(string $level, int $expectedLevel): void { $this->assertEquals($expectedLevel, PsrLoggerAdapter::logLevelToInt($level)); } @@ -58,9 +54,7 @@ class PsrLoggerAdapterTest extends TestCase { ]; } - /** - * @dataProvider dataInvalidLoggingLevel - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataInvalidLoggingLevel')] public function testInvalidLoggingLevel($level): void { $this->logger->expects(self::never()) ->method('log'); diff --git a/tests/lib/LoggerTest.php b/tests/lib/LoggerTest.php index 972626eccb4..7ad6638537f 100644 --- a/tests/lib/LoggerTest.php +++ b/tests/lib/LoggerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -130,9 +131,7 @@ class LoggerTest extends TestCase implements IWriter { ]; } - /** - * @dataProvider dataMatchesCondition - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataMatchesCondition')] public function testMatchesCondition(string $userId, array $conditions, array $expectedLogs): void { $this->config->expects($this->any()) ->method('getValue') @@ -194,9 +193,7 @@ class LoggerTest extends TestCase implements IWriter { ]; } - /** - * @dataProvider userAndPasswordData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('userAndPasswordData')] public function testDetectlogin(string $user, string $password): void { $this->mockDefaultLogLevel(); $e = new \Exception('test'); @@ -217,9 +214,7 @@ class LoggerTest extends TestCase implements IWriter { } } - /** - * @dataProvider userAndPasswordData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('userAndPasswordData')] public function testDetectcheckPassword(string $user, string $password): void { $this->mockDefaultLogLevel(); $e = new \Exception('test'); @@ -240,9 +235,7 @@ class LoggerTest extends TestCase implements IWriter { } } - /** - * @dataProvider userAndPasswordData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('userAndPasswordData')] public function testDetectvalidateUserPass(string $user, string $password): void { $this->mockDefaultLogLevel(); $e = new \Exception('test'); @@ -263,9 +256,7 @@ class LoggerTest extends TestCase implements IWriter { } } - /** - * @dataProvider userAndPasswordData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('userAndPasswordData')] public function testDetecttryLogin(string $user, string $password): void { $this->mockDefaultLogLevel(); $e = new \Exception('test'); @@ -286,9 +277,7 @@ class LoggerTest extends TestCase implements IWriter { } } - /** - * @dataProvider userAndPasswordData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('userAndPasswordData')] public function testDetectclosure(string $user, string $password): void { $this->mockDefaultLogLevel(); $a = function ($user, $password): void { diff --git a/tests/lib/Mail/EMailTemplateTest.php b/tests/lib/Mail/EMailTemplateTest.php index 4943024043c..1912bf060e2 100644 --- a/tests/lib/Mail/EMailTemplateTest.php +++ b/tests/lib/Mail/EMailTemplateTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Mail/MailerTest.php b/tests/lib/Mail/MailerTest.php index ffc0ee17256..7b911e5c4e2 100644 --- a/tests/lib/Mail/MailerTest.php +++ b/tests/lib/Mail/MailerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -75,10 +76,10 @@ class MailerTest extends TestCase { } /** - * @dataProvider sendmailModeProvider * @param $sendmailMode * @param $binaryParam */ + #[\PHPUnit\Framework\Attributes\DataProvider('sendmailModeProvider')] public function testGetSendmailInstanceSendMail($sendmailMode, $binaryParam): void { $this->config ->expects($this->exactly(2)) @@ -98,10 +99,10 @@ class MailerTest extends TestCase { } /** - * @dataProvider sendmailModeProvider * @param $sendmailMode * @param $binaryParam */ + #[\PHPUnit\Framework\Attributes\DataProvider('sendmailModeProvider')] public function testGetSendmailInstanceSendMailQmail($sendmailMode, $binaryParam): void { $this->config ->expects($this->exactly(2)) @@ -242,9 +243,7 @@ class MailerTest extends TestCase { ]; } - /** - * @dataProvider mailAddressProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('mailAddressProvider')] public function testValidateMailAddress($email, $expected, $strict): void { $this->config ->expects($this->atMost(1)) diff --git a/tests/lib/Mail/MessageTest.php b/tests/lib/Mail/MessageTest.php index 79a12f3c355..18ef9793b5b 100644 --- a/tests/lib/Mail/MessageTest.php +++ b/tests/lib/Mail/MessageTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -71,11 +72,11 @@ class MessageTest extends TestCase { } /** - * @dataProvider mailAddressProvider * * @param string $unconverted * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('mailAddressProvider')] public function testConvertAddresses($unconverted, $expected): void { $this->assertEquals($expected, self::invokePrivate($this->message, 'convertAddresses', [$unconverted])); } diff --git a/tests/lib/Mail/Provider/AddressTest.php b/tests/lib/Mail/Provider/AddressTest.php index ee03f6f1e83..dc5e73526eb 100644 --- a/tests/lib/Mail/Provider/AddressTest.php +++ b/tests/lib/Mail/Provider/AddressTest.php @@ -24,7 +24,7 @@ class AddressTest extends TestCase { } public function testAddress(): void { - + // test set by constructor $this->assertEquals('user1@testing.com', $this->address->getAddress()); // test set by setter @@ -34,7 +34,7 @@ class AddressTest extends TestCase { } public function testLabel(): void { - + // test set by constructor $this->assertEquals('User One', $this->address->getLabel()); // test set by setter diff --git a/tests/lib/Mail/Provider/AttachmentTest.php b/tests/lib/Mail/Provider/AttachmentTest.php index 283391650b5..f02b1d54a7b 100644 --- a/tests/lib/Mail/Provider/AttachmentTest.php +++ b/tests/lib/Mail/Provider/AttachmentTest.php @@ -29,7 +29,7 @@ class AttachmentTest extends TestCase { } public function testName(): void { - + // test set by constructor $this->assertEquals('example1.txt', $this->attachment->getName()); // test set by setter @@ -39,7 +39,7 @@ class AttachmentTest extends TestCase { } public function testType(): void { - + // test set by constructor $this->assertEquals('text/plain', $this->attachment->getType()); // test set by setter @@ -49,7 +49,7 @@ class AttachmentTest extends TestCase { } public function testContents(): void { - + // test set by constructor $this->assertEquals('This is the contents of a file', $this->attachment->getContents()); // test set by setter @@ -59,7 +59,7 @@ class AttachmentTest extends TestCase { } public function testEmbedded(): void { - + // test set by constructor $this->assertEquals(false, $this->attachment->getEmbedded()); // test set by setter diff --git a/tests/lib/Mail/Provider/MessageTest.php b/tests/lib/Mail/Provider/MessageTest.php index 1791a03421c..6b387e5b010 100644 --- a/tests/lib/Mail/Provider/MessageTest.php +++ b/tests/lib/Mail/Provider/MessageTest.php @@ -56,14 +56,14 @@ class MessageTest extends TestCase { } public function testId(): void { - + // test set by constructor $this->assertEquals('cd02ea42-feac-4863-b9d8-484d16a587ea', $this->message->id()); } public function testFrom(): void { - + // test not set $this->assertNull($this->message->getFrom()); // test set by setter @@ -73,7 +73,7 @@ class MessageTest extends TestCase { } public function testReplyTo(): void { - + // test not set $this->assertNull($this->message->getReplyTo()); // test set by setter @@ -83,7 +83,7 @@ class MessageTest extends TestCase { } public function testTo(): void { - + // test not set $this->assertEquals([], $this->message->getTo()); // test set by setter single @@ -96,7 +96,7 @@ class MessageTest extends TestCase { } public function testCc(): void { - + // test not set $this->assertEquals([], $this->message->getCc()); // test set by setter single @@ -109,7 +109,7 @@ class MessageTest extends TestCase { } public function testBcc(): void { - + // test not set $this->assertEquals([], $this->message->getBcc()); // test set by setter single @@ -122,7 +122,7 @@ class MessageTest extends TestCase { } public function testSubject(): void { - + // test not set $this->assertNull($this->message->getSubject()); // test set by setter @@ -132,7 +132,7 @@ class MessageTest extends TestCase { } public function testBody(): void { - + // test not set $this->assertNull($this->message->getBody()); // test set by setter - text body @@ -149,7 +149,7 @@ class MessageTest extends TestCase { } public function testAttachments(): void { - + // test not set $this->assertEquals([], $this->message->getAttachments()); // test set by setter single diff --git a/tests/lib/Memcache/Cache.php b/tests/lib/Memcache/Cache.php index 5845d426311..b48f5557faa 100644 --- a/tests/lib/Memcache/Cache.php +++ b/tests/lib/Memcache/Cache.php @@ -8,9 +8,11 @@ namespace Test\Memcache; +use OCP\IMemcache; + abstract class Cache extends \Test\Cache\TestCache { /** - * @var \OCP\IMemcache cache; + * @var IMemcache cache; */ protected $instance; diff --git a/tests/lib/Memcache/CasTraitTest.php b/tests/lib/Memcache/CasTraitTest.php index 57000049cc7..9de04fa2726 100644 --- a/tests/lib/Memcache/CasTraitTest.php +++ b/tests/lib/Memcache/CasTraitTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Memcache/FactoryTest.php b/tests/lib/Memcache/FactoryTest.php index afd17081660..e16e079349f 100644 --- a/tests/lib/Memcache/FactoryTest.php +++ b/tests/lib/Memcache/FactoryTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -105,9 +106,7 @@ class FactoryTest extends \Test\TestCase { ]; } - /** - * @dataProvider cacheAvailabilityProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('cacheAvailabilityProvider')] public function testCacheAvailability($localCache, $distributedCache, $lockingCache, $expectedLocalCache, $expectedDistributedCache, $expectedLockingCache): void { $logger = $this->getMockBuilder(LoggerInterface::class)->getMock(); @@ -118,9 +117,7 @@ class FactoryTest extends \Test\TestCase { $this->assertTrue(is_a($factory->createLocking(), $expectedLockingCache)); } - /** - * @dataProvider cacheUnavailableProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('cacheUnavailableProvider')] public function testCacheNotAvailableException($localCache, $distributedCache): void { $this->expectException(HintException::class); diff --git a/tests/lib/MemoryInfoTest.php b/tests/lib/MemoryInfoTest.php index a81a5ebcaeb..13e46c96601 100644 --- a/tests/lib/MemoryInfoTest.php +++ b/tests/lib/MemoryInfoTest.php @@ -52,8 +52,8 @@ class MemoryInfoTest extends TestCase { * * @param string $iniValue The "memory_limit" ini data. * @param int|float $expected The expected detected memory limit. - * @dataProvider getMemoryLimitTestData */ + #[\PHPUnit\Framework\Attributes\DataProvider('getMemoryLimitTestData')] public function testMemoryLimit(string $iniValue, int|float $expected): void { ini_set('memory_limit', $iniValue); $memoryInfo = new MemoryInfo(); @@ -74,8 +74,8 @@ class MemoryInfoTest extends TestCase { * * @param int $memoryLimit The memory limit * @param bool $expected If the memory limit is sufficient. - * @dataProvider getSufficientMemoryTestData */ + #[\PHPUnit\Framework\Attributes\DataProvider('getSufficientMemoryTestData')] public function testIsMemoryLimitSufficient(int $memoryLimit, bool $expected): void { /* @var MemoryInfo|MockObject $memoryInfo */ $memoryInfo = $this->getMockBuilder(MemoryInfo::class) diff --git a/tests/lib/Migration/BackgroundRepairTest.php b/tests/lib/Migration/BackgroundRepairTest.php index b85bd4262e0..5bc085eb7ec 100644 --- a/tests/lib/Migration/BackgroundRepairTest.php +++ b/tests/lib/Migration/BackgroundRepairTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/NaturalSortTest.php b/tests/lib/NaturalSortTest.php index dcf3da3d99a..48d09f03087 100644 --- a/tests/lib/NaturalSortTest.php +++ b/tests/lib/NaturalSortTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -11,9 +12,7 @@ use OC\NaturalSort; use OC\NaturalSort_DefaultCollator; class NaturalSortTest extends \Test\TestCase { - /** - * @dataProvider naturalSortDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('naturalSortDataProvider')] public function testNaturalSortCompare($array, $sorted): void { if (!class_exists('Collator')) { $this->markTestSkipped('The intl module is not available, natural sorting might not work as expected.'); @@ -24,9 +23,7 @@ class NaturalSortTest extends \Test\TestCase { $this->assertEquals($sorted, $array); } - /** - * @dataProvider defaultCollatorDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('defaultCollatorDataProvider')] public function testDefaultCollatorCompare($array, $sorted): void { $comparator = new NaturalSort(new NaturalSort_DefaultCollator()); usort($array, [$comparator, 'compare']); diff --git a/tests/lib/NavigationManagerTest.php b/tests/lib/NavigationManagerTest.php index 9ec1081bd97..53d7e81302b 100644 --- a/tests/lib/NavigationManagerTest.php +++ b/tests/lib/NavigationManagerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -40,7 +41,7 @@ class NavigationManagerTest extends TestCase { protected IEVentDispatcher|MockObject $dispatcher; - /** @var \OC\NavigationManager */ + /** @var NavigationManager */ protected $navigationManager; protected LoggerInterface $logger; @@ -121,11 +122,11 @@ class NavigationManagerTest extends TestCase { } /** - * @dataProvider addArrayData * * @param array $entry * @param array $expectedEntry */ + #[\PHPUnit\Framework\Attributes\DataProvider('addArrayData')] public function testAddArray(array $entry, array $expectedEntry): void { $this->assertEmpty($this->navigationManager->getAll('all'), 'Expected no navigation entry exists'); $this->navigationManager->add($entry); @@ -139,11 +140,11 @@ class NavigationManagerTest extends TestCase { } /** - * @dataProvider addArrayData * * @param array $entry * @param array $expectedEntry */ + #[\PHPUnit\Framework\Attributes\DataProvider('addArrayData')] public function testAddClosure(array $entry, array $expectedEntry): void { global $testAddClosureNumberOfCalls; $testAddClosureNumberOfCalls = 0; @@ -214,9 +215,7 @@ class NavigationManagerTest extends TestCase { $this->assertEquals(0, $testAddClosureNumberOfCalls, 'Expected that the closure is not called by getAll()'); } - /** - * @dataProvider providesNavigationConfig - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesNavigationConfig')] public function testWithAppManager($expected, $navigation, $isAdmin = false): void { $l = $this->createMock(IL10N::class); $l->expects($this->any())->method('t')->willReturnCallback(function ($text, $parameters = []) { @@ -730,9 +729,7 @@ class NavigationManagerTest extends TestCase { ]; } - /** - * @dataProvider provideDefaultEntries - */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideDefaultEntries')] public function testGetDefaultEntryIdForUser(string $defaultApps, string $userDefaultApps, string $userApporder, bool $withFallbacks, string $expectedApp): void { $this->navigationManager->add([ 'id' => 'files', diff --git a/tests/lib/Net/HostnameClassifierTest.php b/tests/lib/Net/HostnameClassifierTest.php index 5d80da01e46..c03afdabe83 100644 --- a/tests/lib/Net/HostnameClassifierTest.php +++ b/tests/lib/Net/HostnameClassifierTest.php @@ -32,9 +32,7 @@ class HostnameClassifierTest extends TestCase { ]; } - /** - * @dataProvider localHostnamesData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('localHostnamesData')] public function testLocalHostname(string $host): void { $isLocal = $this->classifier->isLocalHostname($host); @@ -51,9 +49,7 @@ class HostnameClassifierTest extends TestCase { ]; } - /** - * @dataProvider publicHostnamesData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('publicHostnamesData')] public function testPublicHostname(string $host): void { $isLocal = $this->classifier->isLocalHostname($host); diff --git a/tests/lib/Net/IpAddressClassifierTest.php b/tests/lib/Net/IpAddressClassifierTest.php index be0b7e52fe0..f20e1ec1785 100644 --- a/tests/lib/Net/IpAddressClassifierTest.php +++ b/tests/lib/Net/IpAddressClassifierTest.php @@ -30,9 +30,7 @@ class IpAddressClassifierTest extends TestCase { ]; } - /** - * @dataProvider publicIpAddressData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('publicIpAddressData')] public function testPublicAddress(string $ip): void { $isLocal = $this->classifier->isLocalAddress($ip); @@ -54,9 +52,7 @@ class IpAddressClassifierTest extends TestCase { ]; } - /** - * @dataProvider localIpAddressData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('localIpAddressData')] public function testLocalAddress(string $ip): void { $isLocal = $this->classifier->isLocalAddress($ip); diff --git a/tests/lib/Notification/ActionTest.php b/tests/lib/Notification/ActionTest.php index 241e08048a0..252819f1e29 100644 --- a/tests/lib/Notification/ActionTest.php +++ b/tests/lib/Notification/ActionTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -29,9 +30,9 @@ class ActionTest extends TestCase { } /** - * @dataProvider dataSetLabel * @param string $label */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetLabel')] public function testSetLabel($label): void { $this->assertSame('', $this->action->getLabel()); $this->assertSame($this->action, $this->action->setLabel($label)); @@ -46,10 +47,10 @@ class ActionTest extends TestCase { } /** - * @dataProvider dataSetLabelInvalid * @param mixed $label * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetLabelInvalid')] public function testSetLabelInvalid($label): void { $this->expectException(\InvalidArgumentException::class); @@ -65,9 +66,9 @@ class ActionTest extends TestCase { } /** - * @dataProvider dataSetParsedLabel * @param string $label */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetParsedLabel')] public function testSetParsedLabel($label): void { $this->assertSame('', $this->action->getParsedLabel()); $this->assertSame($this->action, $this->action->setParsedLabel($label)); @@ -81,10 +82,10 @@ class ActionTest extends TestCase { } /** - * @dataProvider dataSetParsedLabelInvalid * @param mixed $label * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetParsedLabelInvalid')] public function testSetParsedLabelInvalid($label): void { $this->expectException(\InvalidArgumentException::class); @@ -101,10 +102,10 @@ class ActionTest extends TestCase { } /** - * @dataProvider dataSetLink * @param string $link * @param string $type */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetLink')] public function testSetLink($link, $type): void { $this->assertSame('', $this->action->getLink()); $this->assertSame($this->action, $this->action->setLink($link, $type)); @@ -124,11 +125,11 @@ class ActionTest extends TestCase { } /** - * @dataProvider dataSetLinkInvalid * @param mixed $link * @param mixed $type * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetLinkInvalid')] public function testSetLinkInvalid($link, $type): void { $this->expectException(\InvalidArgumentException::class); @@ -143,9 +144,9 @@ class ActionTest extends TestCase { } /** - * @dataProvider dataSetPrimary * @param bool $primary */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetPrimary')] public function testSetPrimary($primary): void { $this->assertSame(false, $this->action->isPrimary()); $this->assertSame($this->action, $this->action->setPrimary($primary)); diff --git a/tests/lib/Notification/ManagerTest.php b/tests/lib/Notification/ManagerTest.php index 418d642317e..cbd76989d24 100644 --- a/tests/lib/Notification/ManagerTest.php +++ b/tests/lib/Notification/ManagerTest.php @@ -256,11 +256,11 @@ class ManagerTest extends TestCase { } /** - * @dataProvider dataIsFairUseOfFreePushService * @param bool $hasValidSubscription * @param int $userCount * @param bool $isFair */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataIsFairUseOfFreePushService')] public function testIsFairUseOfFreePushService(bool $hasValidSubscription, int $userCount, bool $isFair): void { $this->subscriptionRegistry->method('delegateHasValidSubscription') ->willReturn($hasValidSubscription); diff --git a/tests/lib/Notification/NotificationTest.php b/tests/lib/Notification/NotificationTest.php index 93b1746be3c..cebe9d51021 100644 --- a/tests/lib/Notification/NotificationTest.php +++ b/tests/lib/Notification/NotificationTest.php @@ -57,9 +57,9 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetApp * @param string $app */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetApp')] public function testSetApp($app): void { $this->assertSame('', $this->notification->getApp()); $this->assertSame($this->notification, $this->notification->setApp($app)); @@ -71,10 +71,10 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetAppInvalid * @param mixed $app * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetAppInvalid')] public function testSetAppInvalid($app): void { $this->expectException(\InvalidArgumentException::class); @@ -87,9 +87,9 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetUser * @param string $user */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetUser')] public function testSetUser($user): void { $this->assertSame('', $this->notification->getUser()); $this->assertSame($this->notification, $this->notification->setUser($user)); @@ -101,10 +101,10 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetUserInvalid * @param mixed $user * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetUserInvalid')] public function testSetUserInvalid($user): void { $this->expectException(\InvalidArgumentException::class); @@ -126,9 +126,9 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetDateTime * @param \DateTime $dateTime */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetDateTime')] public function testSetDateTime(\DateTime $dateTime): void { $this->assertSame(0, $this->notification->getDateTime()->getTimestamp()); $this->assertSame($this->notification, $this->notification->setDateTime($dateTime)); @@ -144,11 +144,10 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetDateTimeZero * @param \DateTime $dateTime - * * @expectedMessage 'The given date time is invalid' */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetDateTimeZero')] public function testSetDateTimeZero($dateTime): void { $this->expectException(\InvalidArgumentException::class); @@ -163,10 +162,10 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetObject * @param string $type * @param string $id */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetObject')] public function testSetObject($type, $id): void { $this->assertSame('', $this->notification->getObjectType()); $this->assertSame('', $this->notification->getObjectId()); @@ -187,11 +186,10 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetObjectIdInvalid * @param mixed $id - * * @expectedMessage 'The given object id is invalid' */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetObjectIdInvalid')] public function testSetObjectIdInvalid($id): void { $this->expectException(\InvalidArgumentException::class); @@ -207,10 +205,10 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetSubject * @param string $subject * @param array $parameters */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetSubject')] public function testSetSubject($subject, $parameters): void { $this->assertSame('', $this->notification->getSubject()); $this->assertSame([], $this->notification->getSubjectParameters()); @@ -224,10 +222,10 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetSubjectInvalidSubject * @param mixed $subject * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetSubjectInvalidSubject')] public function testSetSubjectInvalidSubject($subject): void { $this->expectException(\InvalidArgumentException::class); @@ -239,9 +237,9 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetParsedSubject * @param string $subject */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetParsedSubject')] public function testSetParsedSubject($subject): void { $this->assertSame('', $this->notification->getParsedSubject()); $this->assertSame($this->notification, $this->notification->setParsedSubject($subject)); @@ -253,10 +251,10 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetParsedSubjectInvalid * @param mixed $subject * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetParsedSubjectInvalid')] public function testSetParsedSubjectInvalid($subject): void { $this->expectException(\InvalidArgumentException::class); @@ -272,10 +270,10 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetMessage * @param string $message * @param array $parameters */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetMessage')] public function testSetMessage($message, $parameters): void { $this->assertSame('', $this->notification->getMessage()); $this->assertSame([], $this->notification->getMessageParameters()); @@ -289,10 +287,10 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetMessageInvalidMessage * @param mixed $message * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetMessageInvalidMessage')] public function testSetMessageInvalidMessage($message): void { $this->expectException(\InvalidArgumentException::class); @@ -304,9 +302,9 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetParsedMessage * @param string $message */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetParsedMessage')] public function testSetParsedMessage($message): void { $this->assertSame('', $this->notification->getParsedMessage()); $this->assertSame($this->notification, $this->notification->setParsedMessage($message)); @@ -318,10 +316,10 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetParsedMessageInvalid * @param mixed $message * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetParsedMessageInvalid')] public function testSetParsedMessageInvalid($message): void { $this->expectException(\InvalidArgumentException::class); @@ -333,9 +331,9 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetLink * @param string $link */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetLink')] public function testSetLink($link): void { $this->assertSame('', $this->notification->getLink()); $this->assertSame($this->notification, $this->notification->setLink($link)); @@ -347,10 +345,10 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetLinkInvalid * @param mixed $link * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetLinkInvalid')] public function testSetLinkInvalid($link): void { $this->expectException(\InvalidArgumentException::class); @@ -362,9 +360,9 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetIcon * @param string $icon */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetIcon')] public function testSetIcon($icon): void { $this->assertSame('', $this->notification->getIcon()); $this->assertSame($this->notification, $this->notification->setIcon($icon)); @@ -376,10 +374,10 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataSetIconInvalid * @param mixed $icon * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetIconInvalid')] public function testSetIconInvalid($icon): void { $this->expectException(\InvalidArgumentException::class); @@ -392,7 +390,7 @@ class NotificationTest extends TestCase { } public function testAddAction(): void { - /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ + /** @var IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->createMock(IAction::class); $action->expects($this->once()) ->method('isValid') @@ -410,7 +408,7 @@ class NotificationTest extends TestCase { public function testAddActionInvalid(): void { $this->expectException(\InvalidArgumentException::class); - /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ + /** @var IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->createMock(IAction::class); $action->expects($this->once()) ->method('isValid') @@ -422,7 +420,7 @@ class NotificationTest extends TestCase { } public function testAddActionSecondPrimary(): void { - /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ + /** @var IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->createMock(IAction::class); $action->expects($this->exactly(2)) ->method('isValid') @@ -438,7 +436,7 @@ class NotificationTest extends TestCase { } public function testAddParsedAction(): void { - /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ + /** @var IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->createMock(IAction::class); $action->expects($this->once()) ->method('isValidParsed') @@ -456,7 +454,7 @@ class NotificationTest extends TestCase { public function testAddParsedActionInvalid(): void { $this->expectException(\InvalidArgumentException::class); - /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ + /** @var IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->createMock(IAction::class); $action->expects($this->once()) ->method('isValidParsed') @@ -468,7 +466,7 @@ class NotificationTest extends TestCase { } public function testAddActionSecondParsedPrimary(): void { - /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ + /** @var IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->createMock(IAction::class); $action->expects($this->exactly(2)) ->method('isValidParsed') @@ -484,7 +482,7 @@ class NotificationTest extends TestCase { } public function testAddActionParsedPrimaryEnd(): void { - /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ + /** @var IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action1 = $this->createMock(IAction::class); $action1->expects($this->exactly(2)) ->method('isValidParsed') @@ -492,7 +490,7 @@ class NotificationTest extends TestCase { $action1->expects($this->exactly(2)) ->method('isPrimary') ->willReturn(false); - /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ + /** @var IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action2 = $this->createMock(IAction::class); $action2->expects($this->once()) ->method('isValidParsed') @@ -518,14 +516,14 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataIsValid * * @param bool $isValidCommon * @param string $subject * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataIsValid')] public function testIsValid($isValidCommon, $subject, $expected): void { - /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ + /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->getMockBuilder(Notification::class) ->onlyMethods([ 'isValidCommon', @@ -551,14 +549,14 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataIsValid * * @param bool $isValidCommon * @param string $subject * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataIsValid')] public function testIsParsedValid($isValidCommon, $subject, $expected): void { - /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ + /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->getMockBuilder(Notification::class) ->onlyMethods([ 'isValidCommon', @@ -595,7 +593,6 @@ class NotificationTest extends TestCase { } /** - * @dataProvider dataIsValidCommon * * @param string $app * @param string $user @@ -604,8 +601,9 @@ class NotificationTest extends TestCase { * @param string $objectId * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataIsValidCommon')] public function testIsValidCommon($app, $user, $timestamp, $objectType, $objectId, $expected): void { - /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ + /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->getMockBuilder(Notification::class) ->onlyMethods([ 'getApp', diff --git a/tests/lib/OCS/ApiHelperTest.php b/tests/lib/OCS/ApiHelperTest.php index 93de6b22af7..334fca7169e 100644 --- a/tests/lib/OCS/ApiHelperTest.php +++ b/tests/lib/OCS/ApiHelperTest.php @@ -34,9 +34,7 @@ class ApiHelperTest extends \Test\TestCase { ]; } - /** - * @dataProvider versionDataScriptNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('versionDataScriptNameProvider')] public function testIsV2(string $scriptName, bool $expected): void { $request = $this->getMockBuilder(IRequest::class) ->disableOriginalConstructor() diff --git a/tests/lib/OCS/DiscoveryServiceTest.php b/tests/lib/OCS/DiscoveryServiceTest.php index 2fce12ee3c0..422c97f4221 100644 --- a/tests/lib/OCS/DiscoveryServiceTest.php +++ b/tests/lib/OCS/DiscoveryServiceTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -35,11 +36,11 @@ class DiscoveryServiceTest extends TestCase { } /** - * @dataProvider dataTestIsSafeUrl * * @param string $url * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestIsSafeUrl')] public function testIsSafeUrl($url, $expected): void { $result = $this->invokePrivate($this->discoveryService, 'isSafeUrl', [$url]); $this->assertSame($expected, $result); @@ -58,12 +59,12 @@ class DiscoveryServiceTest extends TestCase { } /** - * @dataProvider dataTestGetEndpoints * * @param array $decodedServices * @param string $service * @param array $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestGetEndpoints')] public function testGetEndpoints($decodedServices, $service, $expected): void { $result = $this->invokePrivate($this->discoveryService, 'getEndpoints', [$decodedServices, $service]); $this->assertSame($expected, $result); diff --git a/tests/lib/OCS/ProviderTest.php b/tests/lib/OCS/ProviderTest.php index ca7ba254ab9..87e01d8301b 100644 --- a/tests/lib/OCS/ProviderTest.php +++ b/tests/lib/OCS/ProviderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -8,12 +9,14 @@ namespace Test\OCS; use OC\OCS\Provider; +use OCP\App\IAppManager; use OCP\AppFramework\Http\JSONResponse; +use OCP\IRequest; class ProviderTest extends \Test\TestCase { - /** @var \OCP\IRequest */ + /** @var IRequest */ private $request; - /** @var \OCP\App\IAppManager */ + /** @var IAppManager */ private $appManager; /** @var Provider */ private $ocsProvider; diff --git a/tests/lib/Preview/BitmapTest.php b/tests/lib/Preview/BitmapTest.php index f442ae73b2e..36e768010a9 100644 --- a/tests/lib/Preview/BitmapTest.php +++ b/tests/lib/Preview/BitmapTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Preview/GeneratorTest.php b/tests/lib/Preview/GeneratorTest.php index 84ffe6662c7..edf5418da6e 100644 --- a/tests/lib/Preview/GeneratorTest.php +++ b/tests/lib/Preview/GeneratorTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -380,7 +381,6 @@ class GeneratorTest extends \Test\TestCase { } /** - * @dataProvider dataSize * * @param int $maxX * @param int $maxY @@ -391,6 +391,7 @@ class GeneratorTest extends \Test\TestCase { * @param int $expectedX * @param int $expectedY */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSize')] public function testCorrectSize($maxX, $maxY, $reqX, $reqY, $crop, $mode, $expectedX, $expectedY): void { $file = $this->createMock(File::class); $file->method('isReadable') diff --git a/tests/lib/Preview/HEICTest.php b/tests/lib/Preview/HEICTest.php index 61dede00e6b..def113fbf08 100644 --- a/tests/lib/Preview/HEICTest.php +++ b/tests/lib/Preview/HEICTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Preview/ImageTest.php b/tests/lib/Preview/ImageTest.php index 03f3403b1b3..88c3090557f 100644 --- a/tests/lib/Preview/ImageTest.php +++ b/tests/lib/Preview/ImageTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Preview/MP3Test.php b/tests/lib/Preview/MP3Test.php index 3f1c9aff61c..faa06fe42a1 100644 --- a/tests/lib/Preview/MP3Test.php +++ b/tests/lib/Preview/MP3Test.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Preview/MovieTest.php b/tests/lib/Preview/MovieTest.php index de7ff45988c..c85a9f99748 100644 --- a/tests/lib/Preview/MovieTest.php +++ b/tests/lib/Preview/MovieTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Preview/OfficeTest.php b/tests/lib/Preview/OfficeTest.php index 471ff0d2367..62a4767fd2e 100644 --- a/tests/lib/Preview/OfficeTest.php +++ b/tests/lib/Preview/OfficeTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Preview/Provider.php b/tests/lib/Preview/Provider.php index daa069483fd..d8f10c430e4 100644 --- a/tests/lib/Preview/Provider.php +++ b/tests/lib/Preview/Provider.php @@ -15,6 +15,7 @@ use OC\Files\Storage\Temporary; use OC\Files\View; use OC\Preview\TXT; use OCP\Files\IRootFolder; +use OCP\IImage; use OCP\IUserManager; use OCP\Server; @@ -71,12 +72,12 @@ abstract class Provider extends \Test\TestCase { /** * Launches all the tests we have * - * @dataProvider dimensionsDataProvider * @requires extension imagick * * @param int $widthAdjustment * @param int $heightAdjustment */ + #[\PHPUnit\Framework\Attributes\DataProvider('dimensionsDataProvider')] public function testGetThumbnail($widthAdjustment, $heightAdjustment): void { $ratio = round($this->width / $this->height, 2); $this->maxWidth = $this->width - $widthAdjustment; @@ -120,7 +121,7 @@ abstract class Provider extends \Test\TestCase { * * @param \OC\Preview\Provider $provider * - * @return bool|\OCP\IImage + * @return bool|IImage */ private function getPreview($provider) { $file = new File(Server::get(IRootFolder::class), $this->rootView, $this->imgPath); @@ -139,7 +140,7 @@ abstract class Provider extends \Test\TestCase { /** * Checks if the preview ratio matches the original ratio * - * @param \OCP\IImage $preview + * @param IImage $preview * @param int $ratio */ private function doesRatioMatch($preview, $ratio) { @@ -150,7 +151,7 @@ abstract class Provider extends \Test\TestCase { /** * Tests if a max size preview of smaller dimensions can be created * - * @param \OCP\IImage $preview + * @param IImage $preview */ private function doesPreviewFit($preview) { $maxDimRatio = round($this->maxWidth / $this->maxHeight, 2); diff --git a/tests/lib/Preview/SVGTest.php b/tests/lib/Preview/SVGTest.php index 418ac33c3d6..8c6d9bb6691 100644 --- a/tests/lib/Preview/SVGTest.php +++ b/tests/lib/Preview/SVGTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -45,9 +46,9 @@ class SVGTest extends Provider { } /** - * @dataProvider dataGetThumbnailSVGHref * @requires extension imagick */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetThumbnailSVGHref')] public function testGetThumbnailSVGHref(string $content): void { $handle = fopen('php://temp', 'w+'); fwrite($handle, '<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> diff --git a/tests/lib/Preview/TXTTest.php b/tests/lib/Preview/TXTTest.php index 9541ec8f31c..d722495136c 100644 --- a/tests/lib/Preview/TXTTest.php +++ b/tests/lib/Preview/TXTTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Profile/Actions/FediverseActionTest.php b/tests/lib/Profile/Actions/FediverseActionTest.php index c0e2e6e6309..7f4c7d96301 100644 --- a/tests/lib/Profile/Actions/FediverseActionTest.php +++ b/tests/lib/Profile/Actions/FediverseActionTest.php @@ -105,7 +105,7 @@ class FediverseActionTest extends TestCase { ]; } - /** @dataProvider dataGetTitle */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetTitle')] public function testGetTitle(string $value): void { $property = $this->createMock(IAccountProperty::class); $property->method('getValue') @@ -154,7 +154,7 @@ class FediverseActionTest extends TestCase { ]; } - /** @dataProvider dataGetTarget */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetTarget')] public function testGetTarget(?string $value, ?string $expected): void { $user = $this->createMock(IUser::class); diff --git a/tests/lib/Remote/Api/OCSTest.php b/tests/lib/Remote/Api/OCSTest.php index 142cb98c5e0..89fd45f0791 100644 --- a/tests/lib/Remote/Api/OCSTest.php +++ b/tests/lib/Remote/Api/OCSTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -53,7 +54,7 @@ class OCSTest extends TestCase { $this->assertEquals('user', $user->getUserId()); } - + public function testGetUserInvalidResponse(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Invalid user response, expected field email not found'); @@ -67,7 +68,7 @@ class OCSTest extends TestCase { $client->getUser('user'); } - + public function testInvalidPassword(): void { $this->expectException(ForbiddenException::class); diff --git a/tests/lib/Remote/InstanceTest.php b/tests/lib/Remote/InstanceTest.php index 027a67010be..560706e4572 100644 --- a/tests/lib/Remote/InstanceTest.php +++ b/tests/lib/Remote/InstanceTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -57,7 +58,7 @@ class InstanceTest extends TestCase { $this->assertEquals(false, $instance2->isActive()); } - + public function testPreventDowngradeAttach(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('refusing to connect to remote instance(example.com) over http that was previously accessible over https'); diff --git a/tests/lib/Repair/CleanTagsTest.php b/tests/lib/Repair/CleanTagsTest.php index 5964fdb7f63..04afabb87d9 100644 --- a/tests/lib/Repair/CleanTagsTest.php +++ b/tests/lib/Repair/CleanTagsTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Repair/ClearFrontendCachesTest.php b/tests/lib/Repair/ClearFrontendCachesTest.php index 4586ecd5ae9..3e5927565fe 100644 --- a/tests/lib/Repair/ClearFrontendCachesTest.php +++ b/tests/lib/Repair/ClearFrontendCachesTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php b/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php index 88fc24b40ad..43203d489e6 100644 --- a/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php +++ b/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -44,11 +45,11 @@ class ClearGeneratedAvatarCacheTest extends \Test\TestCase { } /** - * @dataProvider shouldRunDataProvider * * @param string $from * @param boolean $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('shouldRunDataProvider')] public function testShouldRun($from, $expected): void { $this->config->expects($this->any()) ->method('getSystemValueString') diff --git a/tests/lib/Repair/NC29/SanitizeAccountPropertiesJobTest.php b/tests/lib/Repair/NC29/SanitizeAccountPropertiesJobTest.php index c81cf21226c..2a4f6e9ecf1 100644 --- a/tests/lib/Repair/NC29/SanitizeAccountPropertiesJobTest.php +++ b/tests/lib/Repair/NC29/SanitizeAccountPropertiesJobTest.php @@ -24,7 +24,7 @@ class SanitizeAccountPropertiesJobTest extends TestCase { private IUserManager&MockObject $userManager; private IAccountManager&MockObject $accountManager; private LoggerInterface&MockObject $logger; - + private SanitizeAccountPropertiesJob $job; protected function setUp(): void { diff --git a/tests/lib/Repair/OldGroupMembershipSharesTest.php b/tests/lib/Repair/OldGroupMembershipSharesTest.php index b78f4c567b4..099290b18ed 100644 --- a/tests/lib/Repair/OldGroupMembershipSharesTest.php +++ b/tests/lib/Repair/OldGroupMembershipSharesTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php b/tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php index 7a60bdd18ea..fc88ee5d226 100644 --- a/tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php +++ b/tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Repair/Owncloud/CleanPreviewsTest.php b/tests/lib/Repair/Owncloud/CleanPreviewsTest.php index c0ea6f5bc1f..e5a4441a4fa 100644 --- a/tests/lib/Repair/Owncloud/CleanPreviewsTest.php +++ b/tests/lib/Repair/Owncloud/CleanPreviewsTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Repair/Owncloud/UpdateLanguageCodesTest.php b/tests/lib/Repair/Owncloud/UpdateLanguageCodesTest.php index e2967dfd601..a3eb163b0d6 100644 --- a/tests/lib/Repair/Owncloud/UpdateLanguageCodesTest.php +++ b/tests/lib/Repair/Owncloud/UpdateLanguageCodesTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Repair/RepairCollationTest.php b/tests/lib/Repair/RepairCollationTest.php index e0cf5a8bb6f..3c51325562d 100644 --- a/tests/lib/Repair/RepairCollationTest.php +++ b/tests/lib/Repair/RepairCollationTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Repair/RepairInvalidSharesTest.php b/tests/lib/Repair/RepairInvalidSharesTest.php index f987d35f5c0..72103976da5 100644 --- a/tests/lib/Repair/RepairInvalidSharesTest.php +++ b/tests/lib/Repair/RepairInvalidSharesTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -149,9 +150,8 @@ class RepairInvalidSharesTest extends TestCase { /** * Test adjusting file share permissions - * - * @dataProvider fileSharePermissionsProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('fileSharePermissionsProvider')] public function testFileSharePermissions($itemType, $testPerms, $expectedPerms): void { $qb = $this->connection->getQueryBuilder(); $qb->insert('share') diff --git a/tests/lib/Repair/RepairMimeTypesTest.php b/tests/lib/Repair/RepairMimeTypesTest.php index e4645b3be4c..0261b56ebe9 100644 --- a/tests/lib/Repair/RepairMimeTypesTest.php +++ b/tests/lib/Repair/RepairMimeTypesTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/RepairTest.php b/tests/lib/RepairTest.php index f567aebf3c8..fd1f6b42e41 100644 --- a/tests/lib/RepairTest.php +++ b/tests/lib/RepairTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/RichObjectStrings/DefinitionsTest.php b/tests/lib/RichObjectStrings/DefinitionsTest.php index 5106de50ba4..60ea820e844 100644 --- a/tests/lib/RichObjectStrings/DefinitionsTest.php +++ b/tests/lib/RichObjectStrings/DefinitionsTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -30,10 +31,10 @@ class DefinitionsTest extends TestCase { } /** - * @dataProvider dataGetDefinition * @param string $type * @param array $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetDefinition')] public function testGetDefinition($type, array $expected): void { $definitions = new Definitions(); $definition = $definitions->getDefinition($type); diff --git a/tests/lib/RichObjectStrings/ValidatorTest.php b/tests/lib/RichObjectStrings/ValidatorTest.php index c5f88394a33..26688d3401a 100644 --- a/tests/lib/RichObjectStrings/ValidatorTest.php +++ b/tests/lib/RichObjectStrings/ValidatorTest.php @@ -80,9 +80,7 @@ class ValidatorTest extends TestCase { ]; } - /** - * @dataProvider dataValidateParameterKeys - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataValidateParameterKeys')] public function testValidateParameterKeys(mixed $key, ?string $throws): void { if ($throws !== null) { diff --git a/tests/lib/Security/Bruteforce/Backend/MemoryCacheBackendTest.php b/tests/lib/Security/Bruteforce/Backend/MemoryCacheBackendTest.php index ac679238617..e0289fa7ca9 100644 --- a/tests/lib/Security/Bruteforce/Backend/MemoryCacheBackendTest.php +++ b/tests/lib/Security/Bruteforce/Backend/MemoryCacheBackendTest.php @@ -67,9 +67,7 @@ class MemoryCacheBackendTest extends TestCase { ]; } - /** - * @dataProvider dataGetAttempts - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetAttempts')] public function testGetAttempts(int $maxAge, ?string $action, ?array $metadata, int $expected): void { $this->cache ->expects($this->once()) diff --git a/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php b/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php index e40726fe56a..86f458d8ea8 100644 --- a/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php +++ b/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php @@ -11,9 +11,10 @@ declare(strict_types=1); namespace Test\Security\CSRF; use OC\Security\CSRF\CsrfTokenGenerator; +use OCP\Security\ISecureRandom; class CsrfTokenGeneratorTest extends \Test\TestCase { - /** @var \OCP\Security\ISecureRandom */ + /** @var ISecureRandom */ private $random; /** @var \OC\Security\CSRF\CsrfTokenGenerator */ private $csrfTokenGenerator; diff --git a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php index 0e8a36112e2..2b2c4af0444 100644 --- a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php +++ b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php @@ -14,7 +14,7 @@ use OC\Security\CSRF\TokenStorage\SessionStorage; use OCP\ISession; class SessionStorageTest extends \Test\TestCase { - /** @var \OCP\ISession */ + /** @var ISession */ private $session; /** @var \OC\Security\CSRF\TokenStorage\SessionStorage */ private $sessionStorage; @@ -42,9 +42,9 @@ class SessionStorageTest extends \Test\TestCase { /** * @param string $token - * @dataProvider getTokenDataProvider * */ + #[\PHPUnit\Framework\Attributes\DataProvider('getTokenDataProvider')] public function testGetTokenWithEmptyToken($token): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Session does not contain a requesttoken'); diff --git a/tests/lib/Security/CertificateManagerTest.php b/tests/lib/Security/CertificateManagerTest.php index 3657eeb2f99..4dadc824ef6 100644 --- a/tests/lib/Security/CertificateManagerTest.php +++ b/tests/lib/Security/CertificateManagerTest.php @@ -114,9 +114,9 @@ class CertificateManagerTest extends \Test\TestCase { } /** - * @dataProvider dangerousFileProvider * @param string $filename */ + #[\PHPUnit\Framework\Attributes\DataProvider('dangerousFileProvider')] public function testAddDangerousFile($filename): void { $this->expectException(InvalidPathException::class); $this->certificateManager->addCertificate(file_get_contents(__DIR__ . '/../../data/certificates/expiredCertificate.crt'), $filename); @@ -136,13 +136,13 @@ class CertificateManagerTest extends \Test\TestCase { } /** - * @dataProvider dataTestNeedRebundling * * @param int $CaBundleMtime * @param int $targetBundleMtime * @param int $targetBundleExists * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestNeedRebundling')] public function testNeedRebundling($CaBundleMtime, $targetBundleMtime, $targetBundleExists, diff --git a/tests/lib/Security/CertificateTest.php b/tests/lib/Security/CertificateTest.php index 3b833974321..732b431d73e 100644 --- a/tests/lib/Security/CertificateTest.php +++ b/tests/lib/Security/CertificateTest.php @@ -31,7 +31,7 @@ class CertificateTest extends \Test\TestCase { $this->expiredCertificate = new Certificate($expiredCertificate, 'ExpiredCertificate'); } - + public function testBogusData(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Certificate could not get parsed.'); diff --git a/tests/lib/Security/CredentialsManagerTest.php b/tests/lib/Security/CredentialsManagerTest.php index d5e7a114667..4dfe8c5681d 100644 --- a/tests/lib/Security/CredentialsManagerTest.php +++ b/tests/lib/Security/CredentialsManagerTest.php @@ -17,9 +17,7 @@ use OCP\Server; * @group DB */ class CredentialsManagerTest extends \Test\TestCase { - /** - * @dataProvider credentialsProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('credentialsProvider')] public function testWithDB($userId, $identifier): void { $credentialsManager = Server::get(ICredentialsManager::class); @@ -34,9 +32,7 @@ class CredentialsManagerTest extends \Test\TestCase { $this->assertSame(1, $removedRows); } - /** - * @dataProvider credentialsProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('credentialsProvider')] public function testUpdate($userId, $identifier): void { $credentialsManager = Server::get(ICredentialsManager::class); diff --git a/tests/lib/Security/CryptoTest.php b/tests/lib/Security/CryptoTest.php index b650e3ffc09..0f8575ab0b5 100644 --- a/tests/lib/Security/CryptoTest.php +++ b/tests/lib/Security/CryptoTest.php @@ -31,9 +31,7 @@ class CryptoTest extends \Test\TestCase { $this->crypto = new Crypto(Server::get(IConfig::class)); } - /** - * @dataProvider defaultEncryptionProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('defaultEncryptionProvider')] public function testDefaultEncrypt($stringToEncrypt): void { $ciphertext = $this->crypto->encrypt($stringToEncrypt); $this->assertEquals($stringToEncrypt, $this->crypto->decrypt($ciphertext)); diff --git a/tests/lib/Security/HasherTest.php b/tests/lib/Security/HasherTest.php index 11b63e8ec88..33130f86a73 100644 --- a/tests/lib/Security/HasherTest.php +++ b/tests/lib/Security/HasherTest.php @@ -124,18 +124,14 @@ class HasherTest extends \Test\TestCase { $this->assertNotNull($hash); } - /** - * @dataProvider versionHashProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('versionHashProvider')] public function testSplitHash($hash, $expected): void { $relativePath = self::invokePrivate($this->hasher, 'splitHash', [$hash]); $this->assertSame($expected, $relativePath); } - /** - * @dataProvider hashProviders70_71 - */ + #[\PHPUnit\Framework\Attributes\DataProvider('hashProviders70_71')] public function testVerify($password, $hash, $expected): void { $this->config ->expects($this->any()) @@ -151,9 +147,7 @@ class HasherTest extends \Test\TestCase { $this->assertSame($expected, $result); } - /** - * @dataProvider hashProviders72 - */ + #[\PHPUnit\Framework\Attributes\DataProvider('hashProviders72')] public function testVerifyArgon2i($password, $hash, $expected): void { if (!\defined('PASSWORD_ARGON2I')) { $this->markTestSkipped('Need ARGON2 support to test ARGON2 hashes'); @@ -163,9 +157,7 @@ class HasherTest extends \Test\TestCase { $this->assertSame($expected, $result); } - /** - * @dataProvider hashProviders73 - */ + #[\PHPUnit\Framework\Attributes\DataProvider('hashProviders73')] public function testVerifyArgon2id(string $password, string $hash, bool $expected): void { if (!\defined('PASSWORD_ARGON2ID')) { $this->markTestSkipped('Need ARGON2ID support to test ARGON2ID hashes'); diff --git a/tests/lib/Security/Ip/BruteforceAllowListTest.php b/tests/lib/Security/Ip/BruteforceAllowListTest.php index efdb7c4034c..0cffc128d64 100644 --- a/tests/lib/Security/Ip/BruteforceAllowListTest.php +++ b/tests/lib/Security/Ip/BruteforceAllowListTest.php @@ -130,10 +130,9 @@ class BruteforceAllowListTest extends TestCase { } /** - * @dataProvider dataIsBypassListed - * * @param string[] $allowList */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataIsBypassListed')] public function testIsBypassListed( string $ip, array $allowList, diff --git a/tests/lib/Security/Ip/RemoteAddressTest.php b/tests/lib/Security/Ip/RemoteAddressTest.php index 63c1b452294..a6619cffe8e 100644 --- a/tests/lib/Security/Ip/RemoteAddressTest.php +++ b/tests/lib/Security/Ip/RemoteAddressTest.php @@ -25,8 +25,8 @@ class RemoteAddressTest extends \Test\TestCase { /** * @param mixed $allowedRanges - * @dataProvider dataProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')] public function testAllowedIps(string $remoteIp, $allowedRanges, bool $expected): void { $this->request ->method('getRemoteAddress') diff --git a/tests/lib/Security/Normalizer/IpAddressTest.php b/tests/lib/Security/Normalizer/IpAddressTest.php index 29067596c98..f7adfb4a0dd 100644 --- a/tests/lib/Security/Normalizer/IpAddressTest.php +++ b/tests/lib/Security/Normalizer/IpAddressTest.php @@ -55,11 +55,11 @@ class IpAddressTest extends TestCase { } /** - * @dataProvider subnetDataProvider * * @param string $input * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('subnetDataProvider')] public function testGetSubnet($input, $expected): void { $this->assertSame($expected, (new IpAddress($input))->getSubnet()); } diff --git a/tests/lib/Security/RemoteHostValidatorIntegrationTest.php b/tests/lib/Security/RemoteHostValidatorIntegrationTest.php index 3d319e828ff..913acfa054d 100644 --- a/tests/lib/Security/RemoteHostValidatorIntegrationTest.php +++ b/tests/lib/Security/RemoteHostValidatorIntegrationTest.php @@ -73,9 +73,7 @@ class RemoteHostValidatorIntegrationTest extends TestCase { ]; } - /** - * @dataProvider localHostsData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('localHostsData')] public function testLocalHostsWhenNotAllowed(string $host): void { $this->config ->method('getSystemValueBool') @@ -87,9 +85,7 @@ class RemoteHostValidatorIntegrationTest extends TestCase { self::assertFalse($isValid); } - /** - * @dataProvider localHostsData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('localHostsData')] public function testLocalHostsWhenAllowed(string $host): void { $this->config ->method('getSystemValueBool') @@ -111,9 +107,7 @@ class RemoteHostValidatorIntegrationTest extends TestCase { ]; } - /** - * @dataProvider externalAddressesData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('externalAddressesData')] public function testExternalHost(string $host): void { $this->config ->method('getSystemValueBool') diff --git a/tests/lib/Security/RemoteHostValidatorTest.php b/tests/lib/Security/RemoteHostValidatorTest.php index 46c969d28c1..b048b9dafd1 100644 --- a/tests/lib/Security/RemoteHostValidatorTest.php +++ b/tests/lib/Security/RemoteHostValidatorTest.php @@ -51,9 +51,7 @@ class RemoteHostValidatorTest extends TestCase { ]; } - /** - * @dataProvider dataValid - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataValid')] public function testValid(string $host, bool $expected): void { $this->hostnameClassifier ->method('isLocalHostname') diff --git a/tests/lib/Security/SecureRandomTest.php b/tests/lib/Security/SecureRandomTest.php index 490045a4c52..954fd85eaf1 100644 --- a/tests/lib/Security/SecureRandomTest.php +++ b/tests/lib/Security/SecureRandomTest.php @@ -40,34 +40,26 @@ class SecureRandomTest extends \Test\TestCase { $this->rng = new SecureRandom(); } - /** - * @dataProvider stringGenerationProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('stringGenerationProvider')] public function testGetLowStrengthGeneratorLength($length, $expectedLength): void { $generator = $this->rng; $this->assertEquals($expectedLength, strlen($generator->generate($length))); } - /** - * @dataProvider stringGenerationProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('stringGenerationProvider')] public function testMediumLowStrengthGeneratorLength($length, $expectedLength): void { $generator = $this->rng; $this->assertEquals($expectedLength, strlen($generator->generate($length))); } - /** - * @dataProvider stringGenerationProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('stringGenerationProvider')] public function testUninitializedGenerate($length, $expectedLength): void { $this->assertEquals($expectedLength, strlen($this->rng->generate($length))); } - /** - * @dataProvider charCombinations - */ + #[\PHPUnit\Framework\Attributes\DataProvider('charCombinations')] public function testScheme($charName, $chars): void { $generator = $this->rng; $scheme = constant('OCP\Security\ISecureRandom::' . $charName); @@ -83,9 +75,7 @@ class SecureRandomTest extends \Test\TestCase { ]; } - /** - * @dataProvider invalidLengths - */ + #[\PHPUnit\Framework\Attributes\DataProvider('invalidLengths')] public function testInvalidLengths($length): void { $this->expectException(\LengthException::class); $generator = $this->rng; diff --git a/tests/lib/Security/TrustedDomainHelperTest.php b/tests/lib/Security/TrustedDomainHelperTest.php index 1b9ba20a906..8b671a93d06 100644 --- a/tests/lib/Security/TrustedDomainHelperTest.php +++ b/tests/lib/Security/TrustedDomainHelperTest.php @@ -27,11 +27,11 @@ class TrustedDomainHelperTest extends \Test\TestCase { } /** - * @dataProvider trustedDomainDataProvider * @param string $trustedDomains * @param string $testDomain * @param bool $result */ + #[\PHPUnit\Framework\Attributes\DataProvider('trustedDomainDataProvider')] public function testIsTrustedUrl($trustedDomains, $testDomain, $result): void { $this->config->method('getSystemValue') ->willReturnMap([ @@ -44,11 +44,11 @@ class TrustedDomainHelperTest extends \Test\TestCase { } /** - * @dataProvider trustedDomainDataProvider * @param string $trustedDomains * @param string $testDomain * @param bool $result */ + #[\PHPUnit\Framework\Attributes\DataProvider('trustedDomainDataProvider')] public function testIsTrustedDomain($trustedDomains, $testDomain, $result): void { $this->config->method('getSystemValue') ->willReturnMap([ diff --git a/tests/lib/ServerTest.php b/tests/lib/ServerTest.php index 58d987a102d..b070641e856 100644 --- a/tests/lib/ServerTest.php +++ b/tests/lib/ServerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -20,7 +21,7 @@ use OCP\Comments\ICommentsManager; * @package Test */ class ServerTest extends \Test\TestCase { - /** @var \OC\Server */ + /** @var Server */ protected $server; @@ -43,11 +44,11 @@ class ServerTest extends \Test\TestCase { } /** - * @dataProvider dataTestQuery * * @param string $serviceName * @param string $instanceOf */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestQuery')] public function testQuery($serviceName, $instanceOf): void { $this->assertInstanceOf($instanceOf, $this->server->query($serviceName), 'Service "' . $serviceName . '"" did not return the right class'); } diff --git a/tests/lib/Session/CryptoSessionDataTest.php b/tests/lib/Session/CryptoSessionDataTest.php index 85cdcfbf83b..a30a3297094 100644 --- a/tests/lib/Session/CryptoSessionDataTest.php +++ b/tests/lib/Session/CryptoSessionDataTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -9,13 +10,14 @@ namespace Test\Session; use OC\Session\CryptoSessionData; use OC\Session\Memory; +use OCP\ISession; use OCP\Security\ICrypto; class CryptoSessionDataTest extends Session { - /** @var \PHPUnit\Framework\MockObject\MockObject|\OCP\Security\ICrypto */ + /** @var \PHPUnit\Framework\MockObject\MockObject|ICrypto */ protected $crypto; - /** @var \OCP\ISession */ + /** @var ISession */ protected $wrappedSession; protected function setUp(): void { diff --git a/tests/lib/Session/CryptoWrappingTest.php b/tests/lib/Session/CryptoWrappingTest.php index 8afbf61bddc..2bc09e0903a 100644 --- a/tests/lib/Session/CryptoWrappingTest.php +++ b/tests/lib/Session/CryptoWrappingTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -9,13 +10,14 @@ namespace Test\Session; use OC\Session\CryptoSessionData; use OCP\ISession; +use OCP\Security\ICrypto; use Test\TestCase; class CryptoWrappingTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject|\OCP\Security\ICrypto */ + /** @var \PHPUnit\Framework\MockObject\MockObject|ICrypto */ protected $crypto; - /** @var \PHPUnit\Framework\MockObject\MockObject|\OCP\ISession */ + /** @var \PHPUnit\Framework\MockObject\MockObject|ISession */ protected $wrappedSession; /** @var \OC\Session\CryptoSessionData */ diff --git a/tests/lib/Settings/DeclarativeManagerTest.php b/tests/lib/Settings/DeclarativeManagerTest.php index d279dfa46f0..59411e1f825 100644 --- a/tests/lib/Settings/DeclarativeManagerTest.php +++ b/tests/lib/Settings/DeclarativeManagerTest.php @@ -345,9 +345,7 @@ class DeclarativeManagerTest extends TestCase { $this->assertFalse(isset($formIds[$app]) && in_array($schemaDuplicateFields['id'], $formIds[$app])); } - /** - * @dataProvider dataValidateSchema - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataValidateSchema')] public function testValidateSchema(bool $expected, bool $expectException, string $app, array $schema): void { if ($expectException) { $this->expectException(\Exception::class); diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php index e4672235711..91277cc7f1e 100644 --- a/tests/lib/Settings/ManagerTest.php +++ b/tests/lib/Settings/ManagerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Settings/SectionTest.php b/tests/lib/Settings/SectionTest.php index dd69f8ae110..ecd654ba748 100644 --- a/tests/lib/Settings/SectionTest.php +++ b/tests/lib/Settings/SectionTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/SetupCheck/CheckServerResponseTraitTest.php b/tests/lib/SetupCheck/CheckServerResponseTraitTest.php index 32fbce64ce6..3f7b498bfeb 100644 --- a/tests/lib/SetupCheck/CheckServerResponseTraitTest.php +++ b/tests/lib/SetupCheck/CheckServerResponseTraitTest.php @@ -19,7 +19,7 @@ use Test\TestCase; class CheckServerResponseTraitTest extends TestCase { protected const BASE_URL = 'https://nextcloud.local'; - + private IL10N&MockObject $l10n; private IConfig&MockObject $config; private IURLGenerator&MockObject $urlGenerator; @@ -38,7 +38,7 @@ class CheckServerResponseTraitTest extends TestCase { $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->clientService = $this->createMock(IClientService::class); $this->logger = $this->createMock(LoggerInterface::class); - + $this->trait = new CheckServerResponseTraitImplementation( $this->l10n, $this->config, @@ -48,9 +48,7 @@ class CheckServerResponseTraitTest extends TestCase { ); } - /** - * @dataProvider dataNormalizeUrl - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataNormalizeUrl')] public function testNormalizeUrl(string $url, bool $isRootRequest, string $expected): void { $this->assertEquals($expected, $this->trait->normalizeUrl($url, $isRootRequest)); } @@ -75,9 +73,7 @@ class CheckServerResponseTraitTest extends TestCase { ]; } - /** - * @dataProvider dataGetTestUrls - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetTestUrls')] public function testGetTestUrls( string $url, bool $isRootRequest, @@ -103,7 +99,7 @@ class CheckServerResponseTraitTest extends TestCase { $this->urlGenerator->expects(self::atLeastOnce()) ->method('getBaseUrl') ->willReturn(self::BASE_URL . $webRoot); - + $result = $this->trait->getTestUrls($url, $isRootRequest); $this->assertEquals($expected, $result); } diff --git a/tests/lib/SetupTest.php b/tests/lib/SetupTest.php index f82060dcfa2..0be7eab36f6 100644 --- a/tests/lib/SetupTest.php +++ b/tests/lib/SetupTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -128,10 +129,10 @@ class SetupTest extends \Test\TestCase { } /** - * @dataProvider findWebRootProvider * @param $url * @param $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('findWebRootProvider')] public function testFindWebRootCli($url, $expected): void { $cliState = \OC::$CLI; diff --git a/tests/lib/Share/Backend.php b/tests/lib/Share/Backend.php index 8f38d216ff5..94ac25111c2 100644 --- a/tests/lib/Share/Backend.php +++ b/tests/lib/Share/Backend.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Share/HelperTest.php b/tests/lib/Share/HelperTest.php index b39720181b6..3438f108749 100644 --- a/tests/lib/Share/HelperTest.php +++ b/tests/lib/Share/HelperTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -35,21 +36,19 @@ class HelperTest extends \Test\TestCase { ]; } - /** - * @dataProvider expireDateProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('expireDateProvider')] public function testCalculateExpireDate($defaultExpireSettings, $creationTime, $userExpireDate, $expected): void { $result = Helper::calculateExpireDate($defaultExpireSettings, $creationTime, $userExpireDate); $this->assertSame($expected, $result); } /** - * @dataProvider dataTestCompareServerAddresses * * @param string $server1 * @param string $server2 * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestCompareServerAddresses')] public function testIsSameUserOnSameServer($user1, $server1, $user2, $server2, $expected): void { $this->assertSame($expected, Helper::isSameUserOnSameServer($user1, $server1, $user2, $server2) diff --git a/tests/lib/Share/ShareTest.php b/tests/lib/Share/ShareTest.php index 6814eac4e3c..9690d242067 100644 --- a/tests/lib/Share/ShareTest.php +++ b/tests/lib/Share/ShareTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -126,10 +127,10 @@ class ShareTest extends \Test\TestCase { } /** - * @dataProvider urls * @param string $url * @param string $expectedResult */ + #[\PHPUnit\Framework\Attributes\DataProvider('urls')] public function testRemoveProtocolFromUrl($url, $expectedResult): void { $share = new Share(); $result = self::invokePrivate($share, 'removeProtocolFromUrl', [$url]); @@ -145,10 +146,10 @@ class ShareTest extends \Test\TestCase { } /** - * @dataProvider dataProviderTestGroupItems * @param array $ungrouped * @param array $grouped */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderTestGroupItems')] public function testGroupItems($ungrouped, $grouped): void { $result = DummyShareClass::groupItemsTest($ungrouped); diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index 1b2745882f1..eaf17fa1a26 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -984,9 +985,7 @@ class DefaultShareProviderTest extends \Test\TestCase { ]; } - /** - * @dataProvider storageAndFileNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('storageAndFileNameProvider')] public function testGetSharedWithUser($storageStringId, $fileName1, $fileName2): void { $storageId = $this->createTestStorageEntry($storageStringId); $fileId = $this->createTestFileEntry($fileName1, $storageId); @@ -1035,9 +1034,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->assertEquals(IShare::TYPE_USER, $share->getShareType()); } - /** - * @dataProvider storageAndFileNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('storageAndFileNameProvider')] public function testGetSharedWithGroup($storageStringId, $fileName1, $fileName2): void { $storageId = $this->createTestStorageEntry($storageStringId); $fileId = $this->createTestFileEntry($fileName1, $storageId); @@ -1109,9 +1106,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->assertEquals(IShare::TYPE_GROUP, $share->getShareType()); } - /** - * @dataProvider storageAndFileNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('storageAndFileNameProvider')] public function testGetSharedWithGroupUserModified($storageStringId, $fileName1, $fileName2): void { $storageId = $this->createTestStorageEntry($storageStringId); $fileId = $this->createTestFileEntry($fileName1, $storageId); @@ -1201,9 +1196,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->assertSame('userTarget', $share->getTarget()); } - /** - * @dataProvider storageAndFileNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('storageAndFileNameProvider')] public function testGetSharedWithUserWithNode($storageStringId, $fileName1, $fileName2): void { $storageId = $this->createTestStorageEntry($storageStringId); $fileId = $this->createTestFileEntry($fileName1, $storageId); @@ -1243,9 +1236,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->assertEquals(IShare::TYPE_USER, $share->getShareType()); } - /** - * @dataProvider storageAndFileNameProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('storageAndFileNameProvider')] public function testGetSharedWithGroupWithNode($storageStringId, $fileName1, $fileName2): void { $storageId = $this->createTestStorageEntry($storageStringId); $fileId = $this->createTestFileEntry($fileName1, $storageId); @@ -1295,9 +1286,7 @@ class DefaultShareProviderTest extends \Test\TestCase { ]; } - /** - * @dataProvider shareTypesProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('shareTypesProvider')] public function testGetSharedWithWithDeletedFile($shareType, $trashed): void { if ($trashed) { // exists in database but is in trash @@ -2301,7 +2290,6 @@ class DefaultShareProviderTest extends \Test\TestCase { } /** - * @dataProvider dataDeleteUser * * @param int $type The shareType (user/group/link) * @param string $owner The owner of the share (uid) @@ -2310,6 +2298,7 @@ class DefaultShareProviderTest extends \Test\TestCase { * @param string $deletedUser The user that is deleted * @param bool $rowDeleted Is the row deleted in this setup */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataDeleteUser')] public function testDeleteUser($type, $owner, $initiator, $recipient, $deletedUser, $rowDeleted): void { $qb = $this->dbConn->getQueryBuilder(); $qb->insert('share') @@ -2349,7 +2338,6 @@ class DefaultShareProviderTest extends \Test\TestCase { } /** - * @dataProvider dataDeleteUserGroup * * @param string $owner The owner of the share (uid) * @param string $initiator The initiator of the share (uid) @@ -2358,6 +2346,7 @@ class DefaultShareProviderTest extends \Test\TestCase { * @param bool $groupShareDeleted * @param bool $userGroupShareDeleted */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataDeleteUserGroup')] public function testDeleteUserGroup($owner, $initiator, $recipient, $deletedUser, $groupShareDeleted, $userGroupShareDeleted): void { $qb = $this->dbConn->getQueryBuilder(); $qb->insert('share') @@ -2455,12 +2444,12 @@ class DefaultShareProviderTest extends \Test\TestCase { } /** - * @dataProvider dataGroupDeleted * * @param $shares * @param $groupToDelete * @param $shouldBeDeleted */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGroupDeleted')] public function testGroupDeleted($shares, $groupToDelete, $shouldBeDeleted): void { $qb = $this->dbConn->getQueryBuilder(); $qb->insert('share') @@ -2515,12 +2504,12 @@ class DefaultShareProviderTest extends \Test\TestCase { * And a user specific group share with 'user1'. * User $user is deleted from group $gid. * - * @dataProvider dataUserDeletedFromGroup * * @param string $group * @param string $user * @param bool $toDelete */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataUserDeletedFromGroup')] public function testUserDeletedFromGroup($group, $user, $toDelete): void { $qb = $this->dbConn->getQueryBuilder(); $qb->insert('share') diff --git a/tests/lib/Share20/LegacyHooksTest.php b/tests/lib/Share20/LegacyHooksTest.php index f7e9d77bf03..2ce72b3fc1c 100644 --- a/tests/lib/Share20/LegacyHooksTest.php +++ b/tests/lib/Share20/LegacyHooksTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index 346e6a49206..7859407651f 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -244,9 +245,7 @@ class ManagerTest extends \Test\TestCase { ]; } - /** - * @dataProvider dataTestDelete - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestDelete')] public function testDelete($shareType, $sharedWith): void { $manager = $this->createManagerMock() ->onlyMethods(['getShareById', 'deleteChildren', 'promoteReshares']) @@ -999,12 +998,12 @@ class ManagerTest extends \Test\TestCase { } /** - * @dataProvider dataGeneralChecks * * @param $share * @param $exceptionMessage * @param $exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGeneralChecks')] public function testGeneralChecks($share, $exceptionMessage, $exception): void { $thrown = null; @@ -1075,9 +1074,7 @@ class ManagerTest extends \Test\TestCase { return [[IShare::TYPE_USER], [IShare::TYPE_REMOTE], [IShare::TYPE_REMOTE_GROUP]]; } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalInPast($shareType): void { $this->expectException(GenericShareException::class); $this->expectExceptionMessage('Expiration date is in the past'); @@ -1093,9 +1090,7 @@ class ManagerTest extends \Test\TestCase { self::invokePrivate($this->manager, 'validateExpirationDateInternal', [$share]); } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalEnforceButNotSet($shareType): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Expiration date is enforced'); @@ -1120,9 +1115,7 @@ class ManagerTest extends \Test\TestCase { self::invokePrivate($this->manager, 'validateExpirationDateInternal', [$share]); } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalEnforceButNotEnabledAndNotSet($shareType): void { $share = $this->manager->newShare(); $share->setProviderId('foo')->setId('bar'); @@ -1145,9 +1138,7 @@ class ManagerTest extends \Test\TestCase { $this->assertNull($share->getExpirationDate()); } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalEnforceButNotSetNewShare($shareType): void { $share = $this->manager->newShare(); $share->setShareType($shareType); @@ -1180,9 +1171,7 @@ class ManagerTest extends \Test\TestCase { $this->assertEquals($expected, $share->getExpirationDate()); } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalEnforceRelaxedDefaultButNotSetNewShare($shareType): void { $share = $this->manager->newShare(); $share->setShareType($shareType); @@ -1215,9 +1204,7 @@ class ManagerTest extends \Test\TestCase { $this->assertEquals($expected, $share->getExpirationDate()); } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalEnforceTooFarIntoFuture($shareType): void { $this->expectException(GenericShareException::class); $this->expectExceptionMessage('Cannot set expiration date more than 3 days in the future'); @@ -1248,9 +1235,7 @@ class ManagerTest extends \Test\TestCase { self::invokePrivate($this->manager, 'validateExpirationDateInternal', [$share]); } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalEnforceValid($shareType): void { $future = new \DateTime('now', $this->dateTimeZone->getTimeZone()); $future->add(new \DateInterval('P2D')); @@ -1290,9 +1275,7 @@ class ManagerTest extends \Test\TestCase { $this->assertEquals($expected, $share->getExpirationDate()); } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalNoDefault($shareType): void { $date = new \DateTime('now', $this->dateTimeZone->getTimeZone()); $date->add(new \DateInterval('P5D')); @@ -1316,9 +1299,7 @@ class ManagerTest extends \Test\TestCase { $this->assertEquals($expected, $share->getExpirationDate()); } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalNoDateNoDefault($shareType): void { $hookListener = $this->createMock(DummyShareManagerListener::class); Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListener, 'listener'); @@ -1335,9 +1316,7 @@ class ManagerTest extends \Test\TestCase { $this->assertNull($share->getExpirationDate()); } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalNoDateDefault($shareType): void { $share = $this->manager->newShare(); $share->setShareType($shareType); @@ -1374,9 +1353,7 @@ class ManagerTest extends \Test\TestCase { $this->assertEquals($expected, $share->getExpirationDate()); } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalDefault($shareType): void { $future = new \DateTime('now', $this->timezone); $future->add(new \DateInterval('P5D')); @@ -1416,9 +1393,7 @@ class ManagerTest extends \Test\TestCase { $this->assertEquals($expected, $share->getExpirationDate()); } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalHookModification($shareType): void { $nextWeek = new \DateTime('now', $this->timezone); $nextWeek->add(new \DateInterval('P7D')); @@ -1442,9 +1417,7 @@ class ManagerTest extends \Test\TestCase { $this->assertEquals($save, $share->getExpirationDate()); } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalHookException($shareType): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Invalid date!'); @@ -1467,9 +1440,7 @@ class ManagerTest extends \Test\TestCase { self::invokePrivate($this->manager, 'validateExpirationDateInternal', [$share]); } - /** - * @dataProvider validateExpirationDateInternalProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateExpirationDateInternalProvider')] public function testValidateExpirationDateInternalExistingShareNoDefault($shareType): void { $share = $this->manager->newShare(); $share->setShareType($shareType); @@ -2355,7 +2326,6 @@ class ManagerTest extends \Test\TestCase { } /** - * @dataProvider dataIsSharingDisabledForUser * * @param string $excludeGroups * @param string $groupList @@ -2363,6 +2333,7 @@ class ManagerTest extends \Test\TestCase { * @param string[] $groupIds * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataIsSharingDisabledForUser')] public function testIsSharingDisabledForUser($excludeGroups, $groupList, $setList, $groupIds, $expected): void { $user = $this->createMock(IUser::class); @@ -2407,12 +2378,12 @@ class ManagerTest extends \Test\TestCase { } /** - * @dataProvider dataCanShare * * @param bool $expected * @param string $sharingEnabled * @param bool $disabledForUser */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCanShare')] public function testCanShare($expected, $sharingEnabled, $disabledForUser): void { $this->config->method('getAppValue') ->willReturnMap([ @@ -2959,7 +2930,7 @@ class ManagerTest extends \Test\TestCase { ->onlyMethods(['deleteShare']) ->getMock(); - /** @var \OCP\Share\IShare[] $shares */ + /** @var IShare[] $shares */ $shares = []; /* @@ -2982,7 +2953,7 @@ class ManagerTest extends \Test\TestCase { $shares[4]->setExpirationDate($today); $shares[5]->setExpirationDate($today); - /** @var \OCP\Share\IShare[] $i */ + /** @var IShare[] $i */ $shares2 = []; for ($i = 0; $i < 8; $i++) { $shares2[] = clone $shares[$i]; @@ -4475,9 +4446,7 @@ class ManagerTest extends \Test\TestCase { $this->addToAssertionCount(1); } - /** - * @dataProvider dataTestShareProviderExists - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestShareProviderExists')] public function testShareProviderExists($shareType, $expected): void { $factory = $this->getMockBuilder('OCP\Share\IProviderFactory')->getMock(); $factory->expects($this->any())->method('getProviderForType') @@ -4848,9 +4817,9 @@ class ManagerTest extends \Test\TestCase { } /** - * @dataProvider dataCurrentUserCanEnumerateTargetUser * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCurrentUserCanEnumerateTargetUser')] public function testCurrentUserCanEnumerateTargetUser(bool $currentUserIsGuest, bool $allowEnumerationFullMatch, bool $allowEnumeration, bool $limitEnumerationToPhone, bool $limitEnumerationToGroups, bool $isKnownToUser, bool $haveCommonGroup, bool $expected): void { /** @var IManager|MockObject $manager */ $manager = $this->createManagerMock() diff --git a/tests/lib/Share20/ShareHelperTest.php b/tests/lib/Share20/ShareHelperTest.php index 9027704bb32..3928843cf7d 100644 --- a/tests/lib/Share20/ShareHelperTest.php +++ b/tests/lib/Share20/ShareHelperTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -48,9 +49,7 @@ class ShareHelperTest extends TestCase { ]; } - /** - * @dataProvider dataGetPathsForAccessList - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetPathsForAccessList')] public function testGetPathsForAccessList(array $userList, array $userMap, $resolveUsers, array $remoteList, array $remoteMap, $resolveRemotes, array $expected): void { $this->manager->expects($this->once()) ->method('getAccessList') @@ -101,12 +100,12 @@ class ShareHelperTest extends TestCase { } /** - * @dataProvider dataGetPathsForUsers * * @param array $users * @param array $nodes * @param array $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetPathsForUsers')] public function testGetPathsForUsers(array $users, array $nodes, array $expected): void { $lastNode = null; foreach ($nodes as $nodeId => $nodeName) { @@ -158,12 +157,12 @@ class ShareHelperTest extends TestCase { } /** - * @dataProvider dataGetPathsForRemotes * * @param array $remotes * @param array $nodes * @param array $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetPathsForRemotes')] public function testGetPathsForRemotes(array $remotes, array $nodes, array $expected): void { $lastNode = null; foreach ($nodes as $nodeId => $nodePath) { @@ -198,10 +197,10 @@ class ShareHelperTest extends TestCase { } /** - * @dataProvider dataGetMountedPath * @param string $path * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetMountedPath')] public function testGetMountedPath($path, $expected): void { /** @var Node|\PHPUnit\Framework\MockObject\MockObject $node */ $node = $this->createMock(Node::class); diff --git a/tests/lib/Share20/ShareTest.php b/tests/lib/Share20/ShareTest.php index e95112f9abc..f15fbb860db 100644 --- a/tests/lib/Share20/ShareTest.php +++ b/tests/lib/Share20/ShareTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -11,6 +12,7 @@ use OC\Share20\Share; use OCP\Files\IRootFolder; use OCP\IUserManager; use OCP\Share\Exceptions\IllegalIDChangeException; +use OCP\Share\IShare; use PHPUnit\Framework\MockObject\MockObject; /** @@ -23,7 +25,7 @@ class ShareTest extends \Test\TestCase { protected $rootFolder; /** @var IUserManager|MockObject */ protected $userManager; - /** @var \OCP\Share\IShare */ + /** @var IShare */ protected $share; protected function setUp(): void { diff --git a/tests/lib/SubAdminTest.php b/tests/lib/SubAdminTest.php index ce5410e9b88..39bb72b445c 100644 --- a/tests/lib/SubAdminTest.php +++ b/tests/lib/SubAdminTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -12,7 +13,9 @@ use OCP\EventDispatcher\IEventDispatcher; use OCP\Group\Events\SubAdminAddedEvent; use OCP\Group\Events\SubAdminRemovedEvent; use OCP\IDBConnection; +use OCP\IGroup; use OCP\IGroupManager; +use OCP\IUser; use OCP\IUserManager; use OCP\Server; @@ -20,22 +23,22 @@ use OCP\Server; * @group DB */ class SubAdminTest extends \Test\TestCase { - /** @var \OCP\IUserManager */ + /** @var IUserManager */ private $userManager; - /** @var \OCP\IGroupManager */ + /** @var IGroupManager */ private $groupManager; - /** @var \OCP\IDBConnection */ + /** @var IDBConnection */ private $dbConn; /** @var IEventDispatcher */ private $eventDispatcher; - /** @var \OCP\IUser[] */ + /** @var IUser[] */ private $users; - /** @var \OCP\IGroup[] */ + /** @var IGroup[] */ private $groups; protected function setUp(): void { diff --git a/tests/lib/Support/Subscription/RegistryTest.php b/tests/lib/Support/Subscription/RegistryTest.php index 3f2b9f5032f..e6e83d6038b 100644 --- a/tests/lib/Support/Subscription/RegistryTest.php +++ b/tests/lib/Support/Subscription/RegistryTest.php @@ -168,9 +168,7 @@ class RegistryTest extends TestCase { ]; } - /** - * @dataProvider dataForUserLimitCheck - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataForUserLimitCheck')] public function testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount($userLimit, $userCount, $disabledUsers, $expectedResult): void { $this->config->expects($this->once()) ->method('getSystemValueBool') diff --git a/tests/lib/SystemTag/SystemTagManagerTest.php b/tests/lib/SystemTag/SystemTagManagerTest.php index 806c3fea240..7bbe86aabe7 100644 --- a/tests/lib/SystemTag/SystemTagManagerTest.php +++ b/tests/lib/SystemTag/SystemTagManagerTest.php @@ -96,9 +96,7 @@ class SystemTagManagerTest extends TestCase { ]; } - /** - * @dataProvider getAllTagsDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('getAllTagsDataProvider')] public function testGetAllTags($testTags): void { $testTagsById = []; foreach ($testTags as $testTag) { @@ -205,9 +203,7 @@ class SystemTagManagerTest extends TestCase { ]; } - /** - * @dataProvider getAllTagsFilteredDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('getAllTagsFilteredDataProvider')] public function testGetAllTagsFiltered($testTags, $visibilityFilter, $nameSearch, $expectedResults): void { foreach ($testTags as $testTag) { $this->tagManager->createTag($testTag[0], $testTag[1], $testTag[2]); @@ -238,9 +234,7 @@ class SystemTagManagerTest extends TestCase { ]; } - /** - * @dataProvider oneTagMultipleFlagsProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('oneTagMultipleFlagsProvider')] public function testCreateDuplicate($name, $userVisible, $userAssignable): void { $this->expectException(TagAlreadyExistsException::class); @@ -257,9 +251,7 @@ class SystemTagManagerTest extends TestCase { $this->assertSame('Zona circundante do Palรกcio Nacional da Ajuda (Jardim das Damas', $tag->getName()); // 63 characters but 64 bytes due to "รก" } - /** - * @dataProvider oneTagMultipleFlagsProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('oneTagMultipleFlagsProvider')] public function testGetExistingTag($name, $userVisible, $userAssignable): void { $tag1 = $this->tagManager->createTag($name, $userVisible, $userAssignable); $tag2 = $this->tagManager->getTag($name, $userVisible, $userAssignable); @@ -327,9 +319,7 @@ class SystemTagManagerTest extends TestCase { ]; } - /** - * @dataProvider updateTagProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('updateTagProvider')] public function testUpdateTag($tagCreate, $tagUpdated): void { $tag1 = $this->tagManager->createTag( $tagCreate[0], @@ -359,9 +349,7 @@ class SystemTagManagerTest extends TestCase { } - /** - * @dataProvider updateTagProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('updateTagProvider')] public function testUpdateTagDuplicate($tagCreate, $tagUpdated): void { $this->expectException(TagAlreadyExistsException::class); @@ -436,9 +424,7 @@ class SystemTagManagerTest extends TestCase { ]; } - /** - * @dataProvider visibilityCheckProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('visibilityCheckProvider')] public function testVisibilityCheck($userVisible, $userAssignable, $isAdmin, $expectedResult): void { $user = $this->getMockBuilder(IUser::class)->getMock(); $user->expects($this->any()) @@ -483,9 +469,7 @@ class SystemTagManagerTest extends TestCase { ]; } - /** - * @dataProvider assignabilityCheckProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('assignabilityCheckProvider')] public function testAssignabilityCheck($userVisible, $userAssignable, $isAdmin, $expectedResult, $userGroupIds = [], $tagGroupIds = []): void { $user = $this->getMockBuilder(IUser::class)->getMock(); $user->expects($this->any()) @@ -542,9 +526,7 @@ class SystemTagManagerTest extends TestCase { ]; } - /** - * @dataProvider allowedToCreateProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('allowedToCreateProvider')] public function testAllowedToCreateTag(bool $isCli, ?bool $isAdmin, bool $isRestricted): void { $oldCli = \OC::$CLI; \OC::$CLI = $isCli; @@ -580,9 +562,7 @@ class SystemTagManagerTest extends TestCase { ]; } - /** - * @dataProvider disallowedToCreateProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('disallowedToCreateProvider')] public function testDisallowedToCreateTag(?bool $isAdmin): void { $oldCli = \OC::$CLI; \OC::$CLI = false; diff --git a/tests/lib/TagsTest.php b/tests/lib/TagsTest.php index 92e6f7c7dc7..d47ce2d2178 100644 --- a/tests/lib/TagsTest.php +++ b/tests/lib/TagsTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -11,6 +12,7 @@ use OC\Tagging\TagMapper; use OC\TagManager; use OCP\EventDispatcher\IEventDispatcher; use OCP\IDBConnection; +use OCP\ITagManager; use OCP\IUser; use OCP\IUserManager; use OCP\IUserSession; @@ -24,14 +26,14 @@ use Psr\Log\LoggerInterface; */ class TagsTest extends \Test\TestCase { protected $objectType; - /** @var \OCP\IUser */ + /** @var IUser */ protected $user; - /** @var \OCP\IUserSession */ + /** @var IUserSession */ protected $userSession; protected $backupGlobals = false; /** @var \OC\Tagging\TagMapper */ protected $tagMapper; - /** @var \OCP\ITagManager */ + /** @var ITagManager */ protected $tagMgr; protected function setUp(): void { @@ -198,9 +200,9 @@ class TagsTest extends \Test\TestCase { $conn = Server::get(IDBConnection::class); $statement = $conn->prepare( - 'INSERT INTO `*PREFIX*vcategory_to_object` ' . - '(`objid`, `categoryid`, `type`) VALUES ' . - '(?, ?, ?)' + 'INSERT INTO `*PREFIX*vcategory_to_object` ' + . '(`objid`, `categoryid`, `type`) VALUES ' + . '(?, ?, ?)' ); // insert lots of entries diff --git a/tests/lib/TaskProcessing/TaskProcessingTest.php b/tests/lib/TaskProcessing/TaskProcessingTest.php index 1995b6919ab..9a622cf30d3 100644 --- a/tests/lib/TaskProcessing/TaskProcessingTest.php +++ b/tests/lib/TaskProcessing/TaskProcessingTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php index ed02358a8c9..2ae37999b32 100644 --- a/tests/lib/Template/CSSResourceLocatorTest.php +++ b/tests/lib/Template/CSSResourceLocatorTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Template/JSCombinerTest.php b/tests/lib/Template/JSCombinerTest.php index 4881a31a52b..bc286695bc7 100644 --- a/tests/lib/Template/JSCombinerTest.php +++ b/tests/lib/Template/JSCombinerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -473,8 +474,8 @@ var b = \'world\'; * @param $appName * @param $fileName * @param $result - * @dataProvider dataGetCachedSCSS */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetCachedSCSS')] public function testGetCachedSCSS($appName, $fileName, $result): void { $this->urlGenerator->expects($this->once()) ->method('linkToRoute') diff --git a/tests/lib/Template/JSResourceLocatorTest.php b/tests/lib/Template/JSResourceLocatorTest.php index bb2c2bec6c4..89ab8e66dd7 100644 --- a/tests/lib/Template/JSResourceLocatorTest.php +++ b/tests/lib/Template/JSResourceLocatorTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Template/ResourceLocatorTest.php b/tests/lib/Template/ResourceLocatorTest.php index 311cf317129..599c8391ade 100644 --- a/tests/lib/Template/ResourceLocatorTest.php +++ b/tests/lib/Template/ResourceLocatorTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/TemplateFunctionsTest.php b/tests/lib/TemplateFunctionsTest.php index 5b23ef434c2..8c1523628ab 100644 --- a/tests/lib/TemplateFunctionsTest.php +++ b/tests/lib/TemplateFunctionsTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/TemplateLayoutTest.php b/tests/lib/TemplateLayoutTest.php index b3895525408..c1cafcd6b93 100644 --- a/tests/lib/TemplateLayoutTest.php +++ b/tests/lib/TemplateLayoutTest.php @@ -40,7 +40,7 @@ class TemplateLayoutTest extends \Test\TestCase { $this->serverVersion = $this->createMock(ServerVersion::class); } - /** @dataProvider dataVersionHash */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataVersionHash')] public function testVersionHash($path, $file, $installed, $debug, $expected): void { $this->appManager->expects(self::any()) ->method('getAppVersion') diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php index da1313d3697..e91e847e859 100644 --- a/tests/lib/TestCase.php +++ b/tests/lib/TestCase.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -18,6 +19,7 @@ use OC\Files\Mount\LocalHomeMountProvider; use OC\Files\Mount\RootMountProvider; use OC\Files\ObjectStore\PrimaryObjectStoreConfig; use OC\Files\SetupManager; +use OC\Files\View; use OC\Template\Base; use OCP\Command\IBus; use OCP\DB\QueryBuilder\IQueryBuilder; @@ -492,7 +494,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase { /** * Check if the given path is locked with a given type * - * @param \OC\Files\View $view view + * @param View $view view * @param string $path path to check * @param int $type lock type * @param bool $onMountPoint true to check the mount point instead of the diff --git a/tests/lib/TestMoveableMountPoint.php b/tests/lib/TestMoveableMountPoint.php index 33a5741f6ef..5906a90ee18 100644 --- a/tests/lib/TestMoveableMountPoint.php +++ b/tests/lib/TestMoveableMountPoint.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/TextProcessing/TextProcessingTest.php b/tests/lib/TextProcessing/TextProcessingTest.php index 7761e064834..bdcb4a57d7c 100644 --- a/tests/lib/TextProcessing/TextProcessingTest.php +++ b/tests/lib/TextProcessing/TextProcessingTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Traits/ClientServiceTrait.php b/tests/lib/Traits/ClientServiceTrait.php index 3f0d71aeb28..5a091544889 100644 --- a/tests/lib/Traits/ClientServiceTrait.php +++ b/tests/lib/Traits/ClientServiceTrait.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/lib/Traits/EncryptionTrait.php b/tests/lib/Traits/EncryptionTrait.php index fa0aa1541c3..50c20befc4d 100644 --- a/tests/lib/Traits/EncryptionTrait.php +++ b/tests/lib/Traits/EncryptionTrait.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -42,12 +43,12 @@ trait EncryptionTrait { private $setupManager; /** - * @var \OCP\IConfig + * @var IConfig */ private $config; /** - * @var \OCA\Encryption\AppInfo\Application + * @var Application */ private $encryptionApp; diff --git a/tests/lib/Traits/MountProviderTrait.php b/tests/lib/Traits/MountProviderTrait.php index 479e702e2f1..b680c71b2d6 100644 --- a/tests/lib/Traits/MountProviderTrait.php +++ b/tests/lib/Traits/MountProviderTrait.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -9,6 +10,7 @@ namespace Test\Traits; use OC\Files\Mount\MountPoint; use OC\Files\Storage\StorageFactory; +use OCP\Files\Config\IMountProvider; use OCP\Files\Config\IMountProviderCollection; use OCP\IUser; use OCP\Server; @@ -18,7 +20,7 @@ use OCP\Server; */ trait MountProviderTrait { /** - * @var \OCP\Files\Config\IMountProvider + * @var IMountProvider */ protected $mountProvider; diff --git a/tests/lib/Traits/UserTrait.php b/tests/lib/Traits/UserTrait.php index 137ca986911..f80adb76be8 100644 --- a/tests/lib/Traits/UserTrait.php +++ b/tests/lib/Traits/UserTrait.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -12,6 +13,7 @@ use OCP\EventDispatcher\IEventDispatcher; use OCP\IUser; use OCP\IUserManager; use OCP\Server; +use OCP\UserInterface; class DummyUser extends User { public function __construct( @@ -30,7 +32,7 @@ class DummyUser extends User { */ trait UserTrait { /** - * @var \Test\Util\User\Dummy|\OCP\UserInterface + * @var \Test\Util\User\Dummy|UserInterface */ protected $userBackend; diff --git a/tests/lib/Updater/ChangesCheckTest.php b/tests/lib/Updater/ChangesCheckTest.php index 6b5b306d8f7..dd0d97a9e80 100644 --- a/tests/lib/Updater/ChangesCheckTest.php +++ b/tests/lib/Updater/ChangesCheckTest.php @@ -51,9 +51,7 @@ class ChangesCheckTest extends TestCase { ]; } - /** - * @dataProvider statusCodeProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('statusCodeProvider')] public function testEvaluateResponse(int $statusCode, int $expected): void { $response = $this->createMock(IResponse::class); $response->expects($this->atLeastOnce()) @@ -271,9 +269,7 @@ class ChangesCheckTest extends TestCase { ]; } - /** - * @dataProvider changesXMLProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('changesXMLProvider')] public function testExtractData(string $body, array $expected): void { $actual = $this->invokePrivate($this->checker, 'extractData', [$body]); $this->assertSame($expected, $actual); @@ -286,9 +282,7 @@ class ChangesCheckTest extends TestCase { ]; } - /** - * @dataProvider etagProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('etagProvider')] public function testQueryChangesServer(string $etag): void { $uri = 'https://changes.nextcloud.server/?13.0.5'; $entry = $this->createMock(Changes::class); @@ -323,9 +317,7 @@ class ChangesCheckTest extends TestCase { ]; } - /** - * @dataProvider versionProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('versionProvider')] public function testNormalizeVersion(string $input, string $expected): void { $normalized = $this->checker->normalizeVersion($input); $this->assertSame($expected, $normalized); @@ -342,10 +334,7 @@ class ChangesCheckTest extends TestCase { return array_merge($testDataFound, $testDataNotFound); } - /** - * @dataProvider changeDataProvider - * - */ + #[\PHPUnit\Framework\Attributes\DataProvider('changeDataProvider')] public function testGetChangesForVersion(string $inputVersion, string $normalizedVersion, bool $isFound): void { $mocker = $this->mapper->expects($this->once()) ->method('getChanges') diff --git a/tests/lib/Updater/ReleaseMetadataTest.php b/tests/lib/Updater/ReleaseMetadataTest.php index 335425b7672..e93d9fe64be 100644 --- a/tests/lib/Updater/ReleaseMetadataTest.php +++ b/tests/lib/Updater/ReleaseMetadataTest.php @@ -41,11 +41,11 @@ class ReleaseMetadataTest extends \Test\TestCase { } /** - * @dataProvider getMetadataUrlProvider * * @param string $version * @param string $url */ + #[\PHPUnit\Framework\Attributes\DataProvider('getMetadataUrlProvider')] public function testGetMetadata(string $version, string $url): void { $client = $this->createMock(IClient::class); $response = $this->createMock(IResponse::class); diff --git a/tests/lib/Updater/VersionCheckTest.php b/tests/lib/Updater/VersionCheckTest.php index 0afbed08ab6..1936062a5d0 100644 --- a/tests/lib/Updater/VersionCheckTest.php +++ b/tests/lib/Updater/VersionCheckTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/UpdaterTest.php b/tests/lib/UpdaterTest.php index 291aaf807e5..37a4a105628 100644 --- a/tests/lib/UpdaterTest.php +++ b/tests/lib/UpdaterTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -81,7 +82,6 @@ class UpdaterTest extends TestCase { } /** - * @dataProvider versionCompatibilityTestData * * @param string $oldVersion * @param string $newVersion @@ -90,6 +90,7 @@ class UpdaterTest extends TestCase { * @param bool $debug * @param string $vendor */ + #[\PHPUnit\Framework\Attributes\DataProvider('versionCompatibilityTestData')] public function testIsUpgradePossible($oldVersion, $newVersion, $allowedVersions, $result, $debug = false, $vendor = 'nextcloud'): void { $this->config->expects($this->any()) ->method('getSystemValueBool') diff --git a/tests/lib/UrlGeneratorTest.php b/tests/lib/UrlGeneratorTest.php index 21a0286348a..4320efc4190 100644 --- a/tests/lib/UrlGeneratorTest.php +++ b/tests/lib/UrlGeneratorTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -70,8 +71,8 @@ class UrlGeneratorTest extends \Test\TestCase { /** * @small * test linkTo URL construction - * @dataProvider provideDocRootAppUrlParts */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideDocRootAppUrlParts')] public function testLinkToDocRoot($app, $file, $args, $expectedResult): void { \OC::$WEBROOT = ''; $result = $this->urlGenerator->linkTo($app, $file, $args); @@ -81,17 +82,15 @@ class UrlGeneratorTest extends \Test\TestCase { /** * @small * test linkTo URL construction in sub directory - * @dataProvider provideSubDirAppUrlParts */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideSubDirAppUrlParts')] public function testLinkToSubDir($app, $file, $args, $expectedResult): void { \OC::$WEBROOT = '/nextcloud'; $result = $this->urlGenerator->linkTo($app, $file, $args); $this->assertEquals($expectedResult, $result); } - /** - * @dataProvider provideRoutes - */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideRoutes')] public function testLinkToRouteAbsolute($route, $expected): void { $this->mockBaseUrl(); \OC::$WEBROOT = '/nextcloud'; @@ -134,8 +133,8 @@ class UrlGeneratorTest extends \Test\TestCase { /** * @small * test absolute URL construction - * @dataProvider provideDocRootURLs */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideDocRootURLs')] public function testGetAbsoluteURLDocRoot($url, $expectedResult): void { $this->mockBaseUrl(); \OC::$WEBROOT = ''; @@ -146,8 +145,8 @@ class UrlGeneratorTest extends \Test\TestCase { /** * @small * test absolute URL construction - * @dataProvider provideSubDirURLs */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideSubDirURLs')] public function testGetAbsoluteURLSubDir($url, $expectedResult): void { $this->mockBaseUrl(); \OC::$WEBROOT = '/nextcloud'; @@ -189,9 +188,7 @@ class UrlGeneratorTest extends \Test\TestCase { $this->assertEquals(\OC::$WEBROOT, $actual); } - /** - * @dataProvider provideOCSRoutes - */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideOCSRoutes')] public function testLinkToOCSRouteAbsolute(string $route, bool $ignoreFrontController, string $expected): void { $this->mockBaseUrl(); \OC::$WEBROOT = '/nextcloud'; @@ -276,9 +273,7 @@ class UrlGeneratorTest extends \Test\TestCase { ]; } - /** - * @dataProvider imagePathProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('imagePathProvider')] public function testImagePath(string $appName, string $file, string $result): void { $this->assertSame($result, $this->urlGenerator->imagePath($appName, $file)); } diff --git a/tests/lib/User/AvatarUserDummy.php b/tests/lib/User/AvatarUserDummy.php index d443a31e3f0..001dabd24c6 100644 --- a/tests/lib/User/AvatarUserDummy.php +++ b/tests/lib/User/AvatarUserDummy.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2020-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/User/Backend.php b/tests/lib/User/Backend.php index ed17776476a..dc5b245fa06 100644 --- a/tests/lib/User/Backend.php +++ b/tests/lib/User/Backend.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/User/DatabaseTest.php b/tests/lib/User/DatabaseTest.php index 225a0f75edb..33101173c0a 100644 --- a/tests/lib/User/DatabaseTest.php +++ b/tests/lib/User/DatabaseTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/User/Dummy.php b/tests/lib/User/Dummy.php index ffc5d343200..ec5be8ec60a 100644 --- a/tests/lib/User/Dummy.php +++ b/tests/lib/User/Dummy.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/User/ManagerTest.php b/tests/lib/User/ManagerTest.php index 57041c0ef22..d5872787d0a 100644 --- a/tests/lib/User/ManagerTest.php +++ b/tests/lib/User/ManagerTest.php @@ -368,9 +368,7 @@ class ManagerTest extends TestCase { ]; } - /** - * @dataProvider dataCreateUserInvalid - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataCreateUserInvalid')] public function testCreateUserInvalid($uid, $password, $exception): void { /** @var \Test\Util\User\Dummy|\PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php index 685b7c13d44..50c449559a0 100644 --- a/tests/lib/User/SessionTest.php +++ b/tests/lib/User/SessionTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -111,9 +112,7 @@ class SessionTest extends \Test\TestCase { ]; } - /** - * @dataProvider isLoggedInData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('isLoggedInData')] public function testIsLoggedIn($isLoggedIn): void { $session = $this->createMock(Memory::class); @@ -216,9 +215,9 @@ class SessionTest extends \Test\TestCase { ->method('dispatchTyped') ->with( $this->callback(function (PostLoginEvent $e) { - return $e->getUser()->getUID() === 'foo' && - $e->getPassword() === 'bar' && - $e->isTokenLogin() === false; + return $e->getUser()->getUID() === 'foo' + && $e->getPassword() === 'bar' + && $e->isTokenLogin() === false; }) ); diff --git a/tests/lib/User/UserTest.php b/tests/lib/User/UserTest.php index e386d0c2c10..05056c92193 100644 --- a/tests/lib/User/UserTest.php +++ b/tests/lib/User/UserTest.php @@ -506,10 +506,10 @@ class UserTest extends TestCase { } /** - * @dataProvider dataDeleteHooks * @param bool $result * @param int $expectedHooks */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataDeleteHooks')] public function testDeleteHooks($result, $expectedHooks): void { $hooksCalled = 0; $test = $this; @@ -659,9 +659,7 @@ class UserTest extends TestCase { ]; } - /** - * @dataProvider dataGetCloudId - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetCloudId')] public function testGetCloudId(string $absoluteUrl, string $cloudId): void { /** @var Backend|MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); diff --git a/tests/lib/Util/Group/Dummy.php b/tests/lib/Util/Group/Dummy.php index 50edc15c845..fab94cdc645 100644 --- a/tests/lib/Util/Group/Dummy.php +++ b/tests/lib/Util/Group/Dummy.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/Util/User/Dummy.php b/tests/lib/Util/User/Dummy.php index 93f457184c4..6ecd378c1de 100644 --- a/tests/lib/Util/User/Dummy.php +++ b/tests/lib/Util/User/Dummy.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/tests/lib/UtilCheckServerTest.php b/tests/lib/UtilCheckServerTest.php index accac40112a..087c67120a3 100644 --- a/tests/lib/UtilCheckServerTest.php +++ b/tests/lib/UtilCheckServerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -7,6 +8,7 @@ namespace Test; +use OC\SystemConfig; use OCP\ISession; use OCP\ITempManager; use OCP\Server; @@ -22,7 +24,7 @@ class UtilCheckServerTest extends \Test\TestCase { /** * @param array $systemOptions - * @return \OC\SystemConfig | \PHPUnit\Framework\MockObject\MockObject + * @return SystemConfig|\PHPUnit\Framework\MockObject\MockObject */ protected function getConfig($systemOptions) { $systemOptions['datadirectory'] = $this->datadir; diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php index d1145fc3149..6d995be2434 100644 --- a/tests/lib/UtilTest.php +++ b/tests/lib/UtilTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -340,9 +341,7 @@ class UtilTest extends \Test\TestCase { $this->assertEquals('๐', Util::shortenMultibyteString('๐๐๐', 16, 2)); } - /** - * @dataProvider humanFileSizeProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('humanFileSizeProvider')] public function testHumanFileSize($expected, $input): void { $result = Util::humanFileSize($input); $this->assertEquals($expected, $result); @@ -360,9 +359,7 @@ class UtilTest extends \Test\TestCase { ]; } - /** - * @dataProvider providesComputerFileSize - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesComputerFileSize')] public function testComputerFileSize($expected, $input): void { $result = Util::computerFileSize($input); $this->assertEquals($expected, $result); diff --git a/tests/preseed-config.php b/tests/preseed-config.php index 1524861bf6c..f24c2a23ce1 100644 --- a/tests/preseed-config.php +++ b/tests/preseed-config.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2012-2016 ownCloud, Inc. diff --git a/tests/redis-cluster.config.php b/tests/redis-cluster.config.php index d9951218384..f749ebc81dc 100644 --- a/tests/redis-cluster.config.php +++ b/tests/redis-cluster.config.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/redis.config.php b/tests/redis.config.php index 9068d1ad3d5..dd135345abd 100644 --- a/tests/redis.config.php +++ b/tests/redis.config.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/startsessionlistener.php b/tests/startsessionlistener.php index eb8f0a80853..c1cec5f6492 100644 --- a/tests/startsessionlistener.php +++ b/tests/startsessionlistener.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2015 ownCloud, Inc. |