diff options
Diffstat (limited to 'apps/dav/tests/integration/UserMigration/CalendarMigratorTest.php')
-rw-r--r-- | apps/dav/tests/integration/UserMigration/CalendarMigratorTest.php | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/apps/dav/tests/integration/UserMigration/CalendarMigratorTest.php b/apps/dav/tests/integration/UserMigration/CalendarMigratorTest.php index cf0b24e9a69..0682733a103 100644 --- a/apps/dav/tests/integration/UserMigration/CalendarMigratorTest.php +++ b/apps/dav/tests/integration/UserMigration/CalendarMigratorTest.php @@ -3,30 +3,12 @@ declare(strict_types=1); /** - * @copyright 2022 Christopher Ng <chrng8@gmail.com> - * - * @author Christopher Ng <chrng8@gmail.com> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OCA\DAV\Tests\integration\UserMigration; -use function Safe\scandir; use OCA\DAV\AppInfo\Application; use OCA\DAV\UserMigration\CalendarMigrator; use OCP\AppFramework\App; @@ -38,6 +20,7 @@ use Sabre\VObject\Reader as VObjectReader; use Sabre\VObject\UUIDUtil; use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; +use function scandir; /** * @group DB @@ -61,7 +44,7 @@ class CalendarMigratorTest extends TestCase { $this->output = $this->createMock(OutputInterface::class); } - public function dataAssets(): array { + public static function dataAssets(): array { return array_map( function (string $filename) { /** @var VCalendar $vCalendar */ @@ -85,7 +68,7 @@ class CalendarMigratorTest extends TestCase { fn (VObjectProperty $property) => $property->serialize(), array_values(array_filter( $vCalendar->children(), - fn (mixed $child) => $child instanceof VObjectProperty, + fn ($child) => $child instanceof VObjectProperty, )), ); } @@ -106,9 +89,7 @@ class CalendarMigratorTest extends TestCase { ); } - /** - * @dataProvider dataAssets - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataAssets')] public function testImportExportAsset(string $userId, string $filename, string $initialCalendarUri, VCalendar $importCalendar): void { $user = $this->userManager->createUser($userId, 'topsecretpassword'); |