From 5b53f34ea497d270a30cd3891a61e360457456e0 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Thu, 19 Feb 2026 22:03:53 +0000 Subject: [PATCH] Fix TransformationsTest.php Signed-off-by: Kamil Tekiela --- phpstan-baseline.neon | 15 --------------- psalm-baseline.xml | 6 ------ tests/unit/TransformationsTest.php | 13 ------------- 3 files changed, 34 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 823484edcf..f649ac28b0 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -16734,21 +16734,6 @@ parameters: count: 2 path: tests/unit/Tracking/TrackingTest.php - - - message: ''' - #^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\: - Use dependency injection instead\.$# - ''' - identifier: staticMethod.deprecated - count: 1 - path: tests/unit/TransformationsTest.php - - - - message: '#^Property PhpMyAdmin\\Config\:\:\$settings \(array\{PmaAbsoluteUri\: string, AuthLog\: string, AuthLogSuccess\: bool, PmaNoRelation_DisableWarning\: bool, SuhosinDisableWarning\: bool, LoginCookieValidityDisableWarning\: bool, ReservedWordDisableWarning\: bool, TranslationWarningThreshold\: int, \.\.\.\}\) does not accept array\{ServerDefault\: 1, ActionLinksMode\: ''icons''\}\.$#' - identifier: assign.propertyType - count: 1 - path: tests/unit/TransformationsTest.php - - message: ''' #^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\: diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 6d834bb62c..0616a2c4e2 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -10722,12 +10722,6 @@ - - - - - 1, 'ActionLinksMode' => 'icons']]]> - diff --git a/tests/unit/TransformationsTest.php b/tests/unit/TransformationsTest.php index e6299e75fa..62bfd16cac 100644 --- a/tests/unit/TransformationsTest.php +++ b/tests/unit/TransformationsTest.php @@ -4,10 +4,8 @@ declare(strict_types=1); namespace PhpMyAdmin\Tests; -use PhpMyAdmin\Config; use PhpMyAdmin\ConfigStorage\Relation; use PhpMyAdmin\ConfigStorage\RelationParameters; -use PhpMyAdmin\Current; use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\Tests\Stubs\DummyResult; use PhpMyAdmin\Transformations; @@ -28,17 +26,6 @@ class TransformationsTest extends AbstractTestCase parent::setUp(); $dbi = DatabaseInterface::$instance = $this->createDatabaseInterface(); - Current::$table = 'table'; - Current::$database = 'db'; - $config = Config::getInstance(); - $config->settings = ['ServerDefault' => 1, 'ActionLinksMode' => 'icons']; - $config->selectedServer['pmadb'] = 'pmadb'; - $config->selectedServer['user'] = 'user'; - $config->selectedServer['bookmarktable'] = ''; - $config->selectedServer['relation'] = ''; - $config->selectedServer['table_info'] = ''; - $config->selectedServer['table_coords'] = ''; - $config->selectedServer['column_info'] = 'column_info'; $this->transformations = new Transformations($dbi, new Relation($dbi)); }