aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/tests/AppInfo/ApplicationTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings/tests/AppInfo/ApplicationTest.php')
-rw-r--r--apps/settings/tests/AppInfo/ApplicationTest.php21
1 files changed, 8 insertions, 13 deletions
diff --git a/apps/settings/tests/AppInfo/ApplicationTest.php b/apps/settings/tests/AppInfo/ApplicationTest.php
index 677efdc64bf..3e895d87b06 100644
--- a/apps/settings/tests/AppInfo/ApplicationTest.php
+++ b/apps/settings/tests/AppInfo/ApplicationTest.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,8 @@ use Test\TestCase;
* @group DB
*/
class ApplicationTest extends TestCase {
- /** @var Application */
- protected $app;
-
- /** @var IAppContainer */
- protected $container;
+ protected Application $app;
+ protected IAppContainer $container;
protected function setUp(): void {
parent::setUp();
@@ -40,10 +39,10 @@ class ApplicationTest extends TestCase {
public function testContainerAppName(): void {
$this->app = new Application();
- $this->assertEquals('settings', $this->container->getAppName());
+ $this->assertEquals('settings', $this->container->get('appName'));
}
- public function dataContainerQuery() {
+ public static function dataContainerQuery(): array {
return [
[AdminSettingsController::class, Controller::class],
[AppSettingsController::class, Controller::class],
@@ -57,12 +56,8 @@ class ApplicationTest extends TestCase {
];
}
- /**
- * @dataProvider dataContainerQuery
- * @param string $service
- * @param string $expected
- */
- public function testContainerQuery($service, $expected): void {
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataContainerQuery')]
+ public function testContainerQuery(string $service, string $expected): void {
$this->assertTrue($this->container->query($service) instanceof $expected);
}
}