aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests/Service/DBConfigServiceTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/tests/Service/DBConfigServiceTest.php')
-rw-r--r--apps/files_external/tests/Service/DBConfigServiceTest.php20
1 files changed, 8 insertions, 12 deletions
diff --git a/apps/files_external/tests/Service/DBConfigServiceTest.php b/apps/files_external/tests/Service/DBConfigServiceTest.php
index 51051d6c9f2..85d8b70fda7 100644
--- a/apps/files_external/tests/Service/DBConfigServiceTest.php
+++ b/apps/files_external/tests/Service/DBConfigServiceTest.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -16,17 +18,10 @@ use Test\TestCase;
* @group DB
*/
class DBConfigServiceTest extends TestCase {
- /**
- * @var DBConfigService
- */
- private $dbConfig;
-
- /**
- * @var IDBConnection
- */
- private $connection;
+ private IDBConnection $connection;
+ private DBConfigService $dbConfig;
- private $mounts = [];
+ private array $mounts = [];
protected function setUp(): void {
parent::setUp();
@@ -39,9 +34,10 @@ class DBConfigServiceTest extends TestCase {
$this->dbConfig->removeMount($mount);
}
$this->mounts = [];
+ parent::tearDown();
}
- private function addMount($mountPoint, $storageBackend, $authBackend, $priority, $type) {
+ private function addMount(string $mountPoint, string $storageBackend, string $authBackend, int $priority, int $type) {
$id = $this->dbConfig->addMount($mountPoint, $storageBackend, $authBackend, $priority, $type);
$this->mounts[] = $id;
return $id;
@@ -74,7 +70,7 @@ class DBConfigServiceTest extends TestCase {
$this->dbConfig->addApplicable($id, DBConfigService::APPLICABLE_TYPE_GLOBAL, null);
$mount = $this->dbConfig->getMountById($id);
- $this->assertEquals([
+ $this->assertEqualsCanonicalizing([
['type' => DBConfigService::APPLICABLE_TYPE_USER, 'value' => 'test', 'mount_id' => $id],
['type' => DBConfigService::APPLICABLE_TYPE_GROUP, 'value' => 'bar', 'mount_id' => $id],
['type' => DBConfigService::APPLICABLE_TYPE_GLOBAL, 'value' => null, 'mount_id' => $id]