Skip to content

Commit 3e59ac9

Browse files
committed
MAGETWO-91934: Unlock Locales Editing when SCD on Demand Mode is Enabled
- fixed static tests
1 parent 8c004a7 commit 3e59ac9

File tree

2 files changed

+38
-17
lines changed

2 files changed

+38
-17
lines changed

app/code/Magento/Config/Test/Unit/Model/Config/Structure/ElementVisibility/ConcealScdFieldTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,13 @@ protected function setUp()
6464
* @param bool $isHidden
6565
* @dataProvider disabledDataProvider
6666
*/
67-
public function testCheckVisibility(string $path, string $mageMode,
68-
int $scdOnDemand, bool $isHidden, bool $isDisabled): void
69-
{
67+
public function testCheckVisibility(
68+
string $path,
69+
string $mageMode,
70+
int $scdOnDemand,
71+
bool $isHidden,
72+
bool $isDisabled
73+
): void {
7074
$this->stateMock->expects($this->any())
7175
->method('getMode')
7276
->willReturn($mageMode);

lib/internal/Magento/Framework/Locale/Test/Unit/Deployed/OptionsTest.php

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,11 @@ protected function setUp()
8383
* @param string $mode
8484
* @param int $scdOnDemand
8585
* @param array $locales
86+
* @return void
87+
*
8688
* @dataProvider getFullLocalesDataProvider
8789
*/
88-
public function testGetOptionLocalesFull($mode, $scdOnDemand, $locales)
90+
public function testGetOptionLocalesFull(string $mode, int $scdOnDemand, array $locales): void
8991
{
9092
$this->localeListsMock->expects($this->once())
9193
->method('getOptionLocales')
@@ -100,9 +102,11 @@ public function testGetOptionLocalesFull($mode, $scdOnDemand, $locales)
100102
* @param string $mode
101103
* @param int $scdOnDemand
102104
* @param array $locales
105+
* @return void
106+
*
103107
* @dataProvider getFullLocalesDataProvider
104108
*/
105-
public function testGetTranslatedOptionLocalesFull($mode, $scdOnDemand, $locales)
109+
public function testGetTranslatedOptionLocalesFull(string $mode, int $scdOnDemand, array $locales): void
106110
{
107111
$this->localeListsMock->expects($this->once())
108112
->method('getTranslatedOptionLocales')
@@ -119,10 +123,17 @@ public function testGetTranslatedOptionLocalesFull($mode, $scdOnDemand, $locales
119123
* @param array $locales
120124
* @param array $expectedLocales
121125
* @param array $deployedCodes
126+
* @return void
127+
*
122128
* @dataProvider getLimitedLocalesDataProvider
123129
*/
124-
public function testGetOptionLocalesLimited($mode, $scdOnDemand, $locales, $expectedLocales, $deployedCodes)
125-
{
130+
public function testGetOptionLocalesLimited(
131+
string $mode,
132+
int $scdOnDemand,
133+
array $locales,
134+
array $expectedLocales,
135+
array $deployedCodes
136+
): void {
126137
$this->localeListsMock->expects($this->once())
127138
->method('getOptionLocales')
128139
->willReturn($locales);
@@ -138,11 +149,17 @@ public function testGetOptionLocalesLimited($mode, $scdOnDemand, $locales, $expe
138149
* @param array $locales
139150
* @param array $expectedLocales
140151
* @param array $deployedCodes
152+
* @return void
153+
*
141154
* @dataProvider getLimitedLocalesDataProvider
142155
*/
143-
public function testGetTranslatedOptionLocalesLimited($mode, $scdOnDemand, $locales,
144-
$expectedLocales, $deployedCodes)
145-
{
156+
public function testGetTranslatedOptionLocalesLimited(
157+
string $mode,
158+
int $scdOnDemand,
159+
array $locales,
160+
array $expectedLocales,
161+
array $deployedCodes
162+
): void {
146163
$this->localeListsMock->expects($this->once())
147164
->method('getTranslatedOptionLocales')
148165
->willReturn($locales);
@@ -153,12 +170,12 @@ public function testGetTranslatedOptionLocalesLimited($mode, $scdOnDemand, $loca
153170
}
154171

155172
/**
156-
* @param $mode
173+
* @param string $mode
157174
* @param int $scdOnDemand
158-
* @param $deployedCodes
175+
* @param array $deployedCodes
159176
* @return void
160177
*/
161-
private function prepareGetLocalesLimited($mode, $scdOnDemand, $deployedCodes)
178+
private function prepareGetLocalesLimited(string $mode, int $scdOnDemand, $deployedCodes): void
162179
{
163180
$this->stateMock->expects($this->once())
164181
->method('getMode')
@@ -188,11 +205,11 @@ private function prepareGetLocalesLimited($mode, $scdOnDemand, $deployedCodes)
188205
}
189206

190207
/**
191-
* @param $mode
208+
* @param string $mode
192209
* @param int $scdOnDemand
193210
* @return void
194211
*/
195-
private function prepareGetLocalesFull($mode, $scdOnDemand)
212+
private function prepareGetLocalesFull(string $mode, int $scdOnDemand): void
196213
{
197214
$this->stateMock->expects($this->once())
198215
->method('getMode')
@@ -209,7 +226,7 @@ private function prepareGetLocalesFull($mode, $scdOnDemand)
209226
/**
210227
* @return array
211228
*/
212-
public function getFullLocalesDataProvider()
229+
public function getFullLocalesDataProvider(): array
213230
{
214231
$deLocale = [
215232
'value' => 'de_DE',
@@ -252,7 +269,7 @@ public function getFullLocalesDataProvider()
252269
/**
253270
* @return array
254271
*/
255-
public function getLimitedLocalesDataProvider()
272+
public function getLimitedLocalesDataProvider(): array
256273
{
257274
$deLocale = [
258275
'value' => 'de_DE',

0 commit comments

Comments
 (0)