diff options
Diffstat (limited to 'apps/theming/tests/ServicesTest.php')
-rw-r--r-- | apps/theming/tests/ServicesTest.php | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/apps/theming/tests/ServicesTest.php b/apps/theming/tests/ServicesTest.php index 516a1fca776..3971c9b6698 100644 --- a/apps/theming/tests/ServicesTest.php +++ b/apps/theming/tests/ServicesTest.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 @@ -26,11 +28,9 @@ use Test\TestCase; * @package OCA\Theming\Tests */ class ServicesTest extends TestCase { - /** @var \OCA\Activity\AppInfo\Application */ - protected $app; + protected App $app; - /** @var IAppContainer */ - protected $container; + protected IAppContainer $container; protected function setUp(): void { parent::setUp(); @@ -38,7 +38,7 @@ class ServicesTest extends TestCase { $this->container = $this->app->getContainer(); } - public function queryData() { + public static function queryData(): array { return [ [IL10N::class], @@ -60,15 +60,11 @@ class ServicesTest extends TestCase { ]; } - /** - * @dataProvider queryData - * @param string $service - * @param string $expected - */ - public function testContainerQuery($service, $expected = null): void { + #[\PHPUnit\Framework\Attributes\DataProvider('queryData')] + public function testContainerQuery(string $service, ?string $expected = null): void { if ($expected === null) { $expected = $service; } - $this->assertTrue($this->container->query($service) instanceof $expected); + $this->assertInstanceOf($expected, $this->container->query($service)); } } |