diff options
Diffstat (limited to 'apps/dav/tests/unit/CalDAV/PluginTest.php')
-rw-r--r-- | apps/dav/tests/unit/CalDAV/PluginTest.php | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/apps/dav/tests/unit/CalDAV/PluginTest.php b/apps/dav/tests/unit/CalDAV/PluginTest.php index 0915fdf2646..c5725a1fa81 100644 --- a/apps/dav/tests/unit/CalDAV/PluginTest.php +++ b/apps/dav/tests/unit/CalDAV/PluginTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -9,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(); @@ -18,7 +19,7 @@ class PluginTest extends TestCase { $this->plugin = new Plugin(); } - public function linkProvider() { + public static function linkProvider(): array { return [ [ 'principals/users/MyUserName', @@ -35,13 +36,8 @@ class PluginTest extends TestCase { ]; } - /** - * @dataProvider linkProvider - * - * @param $input - * @param $expected - */ - public function testGetCalendarHomeForPrincipal($input, $expected): void { + #[\PHPUnit\Framework\Attributes\DataProvider('linkProvider')] + public function testGetCalendarHomeForPrincipal(string $input, string $expected): void { $this->assertSame($expected, $this->plugin->getCalendarHomeForPrincipal($input)); } |