Files
Ferdinand Thiessen 44c1fc5b46 feat(setup): allow to pass SSL/TLS config for database connection
Allow to set the database configuration for SSL/TLS connection also
during the setup. This is needed to allow installation with proper SSL
configuration when using the AUTOCONFIG approach.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-08-12 13:37:13 +02:00

37 lines
852 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\Setup;
use OC\DB\Connection;
use OC\DB\ConnectionFactory;
use OC\Setup\AbstractDatabase;
/**
* Minimal concrete implementation to test the shared setup logic of
* {@see AbstractDatabase}, with the connection factory made injectable.
*/
class TestDatabase extends AbstractDatabase {
public string $dbprettyname = 'Test';
public ConnectionFactory $connectionFactory;
#[\Override]
protected function createConnectionFactory(): ConnectionFactory {
return $this->connectionFactory;
}
#[\Override]
public function setupDatabase(): void {
}
public function connectForTest(array $configOverwrite = []): Connection {
return $this->connect($configOverwrite);
}
}