Skip to content

Commit 15c74ab

Browse files
committed
ACP2E-1999: translation for show and set config; fix unit tests
1 parent 5bb1795 commit 15c74ab

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

app/code/Magento/Config/Test/Unit/Console/Command/ConfigSetCommandTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ public function testExecute()
114114
->willReturnCallback(function ($function) {
115115
return $function();
116116
});
117+
$this->localeEmulatorMock->expects($this->once())
118+
->method('emulate')
119+
->willReturnCallback(function ($callback) {
120+
return $callback();
121+
});
117122

118123
$tester = new CommandTester($this->command);
119124
$tester->execute([
@@ -185,12 +190,6 @@ public function testExecuteWithException()
185190
->method('process')
186191
->willThrowException(new ValidatorException(__('The "test/test/test" path does not exists')));
187192

188-
$this->localeEmulatorMock->expects($this->once())
189-
->method('emulate')
190-
->willReturnCallback(function ($function) {
191-
return $function();
192-
});
193-
194193
$tester = new CommandTester($this->command);
195194
$tester->execute([
196195
ConfigSetCommand::ARG_PATH => 'test/test/test',

app/code/Magento/Config/Test/Unit/Console/Command/ConfigShowCommandTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@ public function testExecute(): void
152152
->willReturnCallback(function ($function) {
153153
return $function();
154154
});
155+
$this->localeEmulatorMock->expects($this->once())
156+
->method('emulate')
157+
->willReturnCallback(function ($callback) {
158+
return $callback();
159+
});
155160

156161
$tester = $this->getConfigShowCommandTester(
157162
self::CONFIG_PATH,

0 commit comments

Comments
 (0)