File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
app/code/Magento/Config/Test/Unit/Console/Command Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff 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 ' ,
Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments