From ae3011fe22322a744fc9b8e0f4ddf8b660f6e5e9 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Fri, 1 Sep 2023 18:29:00 +0900 Subject: [PATCH] php unit test fix for DB\IO --- 4dev/tests/DB/CoreLibsDBIOTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/4dev/tests/DB/CoreLibsDBIOTest.php b/4dev/tests/DB/CoreLibsDBIOTest.php index 46ec6709..40479e1a 100644 --- a/4dev/tests/DB/CoreLibsDBIOTest.php +++ b/4dev/tests/DB/CoreLibsDBIOTest.php @@ -733,6 +733,10 @@ final class CoreLibsDBIOTest extends TestCase */ public function testGetSetting(string $connection, array $settings): void { + // if settings are all empty -> assume exception + if (empty($settings['db_name']) && empty($settings['db_user'])) { + $this->expectException('RuntimeException'); + } $db = new \CoreLibs\DB\IO( self::$db_config[$connection], self::$log