Skip to content

Commit fef8ffb

Browse files
author
hwyu@adobe.com
committed
MC-37583: Fix Failing 2FA Integration tests when DB table prefixes are enabled
1 parent 124dc59 commit fef8ffb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

TwoFactorAuth/Test/Integration/UserConfigManagerTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ public function testShouldEncryptConfiguration(): void
170170
$encryptor = Bootstrap::getObjectManager()->create(EncryptorInterface::class);
171171

172172
/** @var ResourceConnection $resourceConnection */
173-
$connection = Bootstrap::getObjectManager()->get(ResourceConnection::class)
174-
->getConnection(ResourceConnection::DEFAULT_CONNECTION);
173+
$resourceConnection = Bootstrap::getObjectManager()->get(ResourceConnection::class);
174+
$connection = $resourceConnection->getConnection(ResourceConnection::DEFAULT_CONNECTION);
175175

176176
$configPayload = ['a' => 1, 'b' => 2];
177177

@@ -181,8 +181,10 @@ public function testShouldEncryptConfiguration(): void
181181
$configPayload
182182
);
183183

184+
$tfaUserConfig = $resourceConnection->getTableName('tfa_user_config');
185+
184186
$qry = $connection->select()
185-
->from('tfa_user_config', 'encoded_config')
187+
->from($tfaUserConfig, 'encoded_config')
186188
->where('user_id = ?', (int)$dummyUser->getId());
187189

188190
$res = $connection->fetchOne($qry);

0 commit comments

Comments
 (0)