@@ -149,7 +149,8 @@ public function testRegenerateStatic(): void
149
149
$ this ->shell
150
150
->expects ($ this ->exactly (4 ))
151
151
->method ('execute ' )
152
- ->withConsecutive ([$ cacheFlushCmd ], [$ setupDiCompileCmd ], [$ cacheFlushCmd ], [$ staticContentDeployCmd ]);
152
+ ->withConsecutive ([$ cacheFlushCmd ], [$ setupDiCompileCmd ], [$ cacheFlushCmd ], [$ staticContentDeployCmd ])
153
+ ->willReturn ("Compilation complete " );
153
154
154
155
$ this ->output
155
156
->method ('writeln ' )
@@ -176,9 +177,18 @@ public function testGenerateStaticForNotAllowedStoreViewLocale(): void
176
177
$ this ->expectExceptionMessage (
177
178
';echo argument has invalid value, run info:language:list for list of available locales '
178
179
);
180
+ $ setupDiCompileCmd = $ this ->cmdPrefix . 'setup:di:compile ' ;
179
181
$ storeLocales = ['fr_FR ' , 'de_DE ' , ';echo ' ];
180
182
$ this ->storeView ->method ('retrieveLocales ' )
181
183
->willReturn ($ storeLocales );
184
+ $ cacheFlushCmd = $ this ->cmdPrefix . 'cache:flush ' ;
185
+ $ staticContentDeployCmd = $ this ->cmdPrefix . 'setup:static-content:deploy -f '
186
+ . implode (' ' , $ storeLocales );
187
+ $ this ->shell
188
+ ->expects ($ this ->exactly (3 ))
189
+ ->method ('execute ' )
190
+ ->withConsecutive ([$ cacheFlushCmd ], [$ setupDiCompileCmd ], [$ cacheFlushCmd ], [$ staticContentDeployCmd ])
191
+ ->willReturn ("Compilation complete " );
182
192
183
193
$ this ->initAdminLocaleMock ('en_US ' );
184
194
@@ -196,9 +206,18 @@ public function testGenerateStaticForNotAllowedAdminLocale(): void
196
206
$ this ->expectExceptionMessage (
197
207
';echo argument has invalid value, run info:language:list for list of available locales '
198
208
);
209
+ $ setupDiCompileCmd = $ this ->cmdPrefix . 'setup:di:compile ' ;
199
210
$ storeLocales = ['fr_FR ' , 'de_DE ' , 'en_US ' ];
211
+ $ cacheFlushCmd = $ this ->cmdPrefix . 'cache:flush ' ;
212
+ $ staticContentDeployCmd = $ this ->cmdPrefix . 'setup:static-content:deploy -f '
213
+ . implode (' ' , $ storeLocales );
200
214
$ this ->storeView ->method ('retrieveLocales ' )
201
215
->willReturn ($ storeLocales );
216
+ $ this ->shell
217
+ ->expects ($ this ->exactly (3 ))
218
+ ->method ('execute ' )
219
+ ->withConsecutive ([$ cacheFlushCmd ], [$ setupDiCompileCmd ], [$ cacheFlushCmd ], [$ staticContentDeployCmd ])
220
+ ->willReturn ("Compilation complete " );
202
221
203
222
$ this ->initAdminLocaleMock (';echo ' );
204
223
0 commit comments