aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/tests/Migration/SetPasswordColumnTest.php')
-rw-r--r--apps/files_sharing/tests/Migration/SetPasswordColumnTest.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php
index eb377412a2e..3cbbad0f8bc 100644
--- a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php
+++ b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2017 ownCloud, Inc.
@@ -9,7 +10,9 @@ namespace OCA\Files_Sharing\Tests\Migration;
use OCA\Files_Sharing\Migration\SetPasswordColumn;
use OCA\Files_Sharing\Tests\TestCase;
use OCP\IConfig;
+use OCP\IDBConnection;
use OCP\Migration\IOutput;
+use OCP\Server;
use OCP\Share\IShare;
/**
@@ -19,7 +22,7 @@ use OCP\Share\IShare;
*/
class SetPasswordColumnTest extends TestCase {
- /** @var \OCP\IDBConnection */
+ /** @var IDBConnection */
private $connection;
/** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
@@ -33,7 +36,7 @@ class SetPasswordColumnTest extends TestCase {
protected function setUp(): void {
parent::setUp();
- $this->connection = \OC::$server->getDatabaseConnection();
+ $this->connection = Server::get(IDBConnection::class);
$this->config = $this->createMock(IConfig::class);
$this->migration = new SetPasswordColumn($this->connection, $this->config);
@@ -50,7 +53,7 @@ class SetPasswordColumnTest extends TestCase {
$query->delete($this->table)->execute();
}
- public function testAddPasswordColumn() {
+ public function testAddPasswordColumn(): void {
$this->config->expects($this->once())
->method('getAppValue')
->with('files_sharing', 'installed_version', '0.0.0')