Skip to content

Commit 286e5f6

Browse files
committed
ACP2E-1512: Env variable config not working for store views with capital letters in the code
fixed disabled "use system value" issue, added unit test
1 parent ac91b3d commit 286e5f6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/code/Magento/Config/Test/Unit/Model/Config/Reader/Source/Deployed/SettingCheckerTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ protected function setUp(): void
6969
$this->checker = new SettingChecker($this->configMock, $placeholderFactoryMock, $this->scopeCodeResolverMock);
7070
}
7171

72+
public function testGetEnvValue(): void
73+
{
74+
$_ENV = array_merge($this->env, ['SOME_PLACEHOLDER' => 0, 'another_placeholder' => 1, 'some_placeholder' => 1]);
75+
$this->placeholderMock->expects($this->any())
76+
->method('isApplicable')
77+
->willReturn(true);
78+
$this->assertSame($this->checker->getEnvValue('SOME_PLACEHOLDER'), 1);
79+
$this->assertSame($this->checker->getEnvValue('another_placeholder'), 1);
80+
}
81+
7282
/**
7383
* @param string $path
7484
* @param string $scope

0 commit comments

Comments
 (0)