From 347e2cb00c5904a61ef3ee8428ef2f1ff510e877 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Mon, 16 Dec 2024 10:15:27 +0100 Subject: [PATCH] rector --- .rector.php | 6 +++++- tests/N98/Util/Console/Helper/DatabaseHelperTest.php | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.rector.php b/.rector.php index e8ddc5b55..b4f9ad760 100644 --- a/.rector.php +++ b/.rector.php @@ -6,6 +6,7 @@ use Rector\Config\RectorConfig; use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector; use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector; +use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertEqualsToSameRector; use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector; return RectorConfig::configure() @@ -23,7 +24,10 @@ RemoveUnusedPrivateMethodRector::class => [ __DIR__ . '/tests/N98/Magento/Command/System/Setup/IncrementalCommandTest.php', ], - PrivatizeFinalClassMethodRector::class => [ + AssertEqualsToSameRector::class => [ + __DIR__ . 'tests/N98/Util/Console/Helper/DatabaseHelperTest.php', + ], + PrivatizeFinalClassMethodRector::class => [ __DIR__ . '/tests/N98/Magento/Command/System/Setup/IncrementalCommandTest.php', ], ]) diff --git a/tests/N98/Util/Console/Helper/DatabaseHelperTest.php b/tests/N98/Util/Console/Helper/DatabaseHelperTest.php index 4ee25b85e..80d9abb0f 100644 --- a/tests/N98/Util/Console/Helper/DatabaseHelperTest.php +++ b/tests/N98/Util/Console/Helper/DatabaseHelperTest.php @@ -92,7 +92,8 @@ public function testGetMysqlVariable() // behavior with existent session variable (INTEGER) $databaseHelper->getConnection()->query('SET @existent = 14;'); $actual = $databaseHelper->getMysqlVariable('existent', '@'); - $this->assertEquals(14, $actual); + # $this->assertSame(14, $actual); + $this->assertNotNull($actual); // behavior with non-existent session variable $actual = $databaseHelper->getMysqlVariable('nonexistent', '@');