diff options
Diffstat (limited to 'apps/dav/tests/unit/CalDAV/PluginTest.php')
-rw-r--r-- | apps/dav/tests/unit/CalDAV/PluginTest.php | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/apps/dav/tests/unit/CalDAV/PluginTest.php b/apps/dav/tests/unit/CalDAV/PluginTest.php index b5da2199e1c..c5725a1fa81 100644 --- a/apps/dav/tests/unit/CalDAV/PluginTest.php +++ b/apps/dav/tests/unit/CalDAV/PluginTest.php @@ -1,27 +1,9 @@ <?php + +declare(strict_types=1); /** - * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch> - * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Georg Ehrke <oc.list@georgehrke.com> - * @author Lukas Reschke <lukas@statuscode.ch> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * - * @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: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OCA\DAV\Tests\unit\CalDAV; @@ -29,8 +11,7 @@ use OCA\DAV\CalDAV\Plugin; use Test\TestCase; class PluginTest extends TestCase { - /** @var Plugin */ - private $plugin; + private Plugin $plugin; protected function setUp(): void { parent::setUp(); @@ -38,7 +19,7 @@ class PluginTest extends TestCase { $this->plugin = new Plugin(); } - public function linkProvider() { + public static function linkProvider(): array { return [ [ 'principals/users/MyUserName', @@ -55,17 +36,12 @@ class PluginTest extends TestCase { ]; } - /** - * @dataProvider linkProvider - * - * @param $input - * @param $expected - */ - public function testGetCalendarHomeForPrincipal($input, $expected) { + #[\PHPUnit\Framework\Attributes\DataProvider('linkProvider')] + public function testGetCalendarHomeForPrincipal(string $input, string $expected): void { $this->assertSame($expected, $this->plugin->getCalendarHomeForPrincipal($input)); } - public function testGetCalendarHomeForUnknownPrincipal() { + public function testGetCalendarHomeForUnknownPrincipal(): void { $this->assertNull($this->plugin->getCalendarHomeForPrincipal('FOO/BAR/BLUB')); } } |