Skip to content

Commit e5b45de

Browse files
committed
AC-15248-V2: Fix Integration Test
1 parent c746587 commit e5b45de

File tree

1 file changed

+10
-5
lines changed
  • dev/tests/integration/framework/Magento/TestFramework/App

1 file changed

+10
-5
lines changed

dev/tests/integration/framework/Magento/TestFramework/App/Config.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?php
22
/**
3-
* Application configuration object. Used to access configuration when application is initialized and installed.
4-
*
5-
* Copyright © Magento, Inc. All rights reserved.
6-
* See COPYING.txt for license details.
3+
* Copyright 2016 Adobe
4+
* All Rights Reserved.
75
*/
86
namespace Magento\TestFramework\App;
97

@@ -70,14 +68,21 @@ public function setValue(
7068
) {
7169
$result = $this->get('system');
7270

71+
$originalScope = $scope;
7372
if ($scope === 'store') {
7473
$scope = 'stores';
7574
} elseif ($scope === 'website') {
7675
$scope = 'websites';
7776
}
7877

7978
if (empty($scopeCode)) {
80-
$scopeCode = $this->getScopeCodeResolver()->resolve($scope, $scopeCode);
79+
// Use original scope type for resolver, as it expects 'store'/'website', not 'stores'/'websites'
80+
try {
81+
$scopeCode = $this->getScopeCodeResolver()->resolve($originalScope, $scopeCode);
82+
} catch (\Exception $e) {
83+
// If scope resolver fails (e.g., during app isolation), fallback to default scope code
84+
$scopeCode = null;
85+
}
8186
}
8287

8388
$keys = explode('/', $path);

0 commit comments

Comments
 (0)