@@ -149,21 +149,23 @@ public function testRegenerateStatic(): void
149
149
$ this ->shell
150
150
->expects ($ this ->exactly (4 ))
151
151
->method ('execute ' )
152
- ->willReturnCallback (function ($ arg1 ) use ($ cacheFlushCmd , $ setupDiCompileCmd , $ staticContentDeployCmd ) {
153
- if ($ arg1 == $ cacheFlushCmd || $ arg1 == $ setupDiCompileCmd || $ arg1 == $ staticContentDeployCmd ) {
154
- return null ;
152
+ ->willReturnCallback (function ($ arg ) use ($ cacheFlushCmd , $ setupDiCompileCmd , $ staticContentDeployCmd ) {
153
+ if ($ arg == $ cacheFlushCmd ||
154
+ $ arg == $ setupDiCompileCmd ||
155
+ $ arg == $ staticContentDeployCmd ) {
156
+ return "Compilation complete " ;
155
157
}
156
158
});
157
159
158
160
$ this ->output
159
161
->method ('writeln ' )
160
- ->willReturnCallback (function ($ arg1 ) {
161
- if ($ arg1 == 'Starting compilation ' ||
162
- $ arg1 == 'Compilation complete ' ||
163
- $ arg1 == 'Starting deployment of static content ' ||
164
- $ arg1 == 'Deployment of static content complete ' ||
165
- empty ($ arg1 )
166
- ) {
162
+ ->willReturnCallback (function ($ arg ) {
163
+ if ($ arg == 'Starting compilation ' ||
164
+ $ arg == 'Compilation complete ' ||
165
+ $ arg == 'Starting deployment of static content ' ||
166
+ $ arg == 'Deployment of static content complete ' ||
167
+ empty ($ arg )
168
+ ) {
167
169
return null ;
168
170
}
169
171
});
@@ -192,8 +194,13 @@ public function testGenerateStaticForNotAllowedStoreViewLocale(): void
192
194
$ this ->shell
193
195
->expects ($ this ->exactly (3 ))
194
196
->method ('execute ' )
195
- ->withConsecutive ([$ cacheFlushCmd ], [$ setupDiCompileCmd ], [$ cacheFlushCmd ], [$ staticContentDeployCmd ])
196
- ->willReturn ("Compilation complete " );
197
+ ->willReturnCallback (function ($ arg ) use ($ cacheFlushCmd , $ setupDiCompileCmd , $ staticContentDeployCmd ) {
198
+ if ($ arg == $ cacheFlushCmd ||
199
+ $ arg == $ setupDiCompileCmd ||
200
+ $ arg == $ staticContentDeployCmd ) {
201
+ return "Compilation complete " ;
202
+ }
203
+ });
197
204
198
205
$ this ->initAdminLocaleMock ('en_US ' );
199
206
@@ -221,8 +228,13 @@ public function testGenerateStaticForNotAllowedAdminLocale(): void
221
228
$ this ->shell
222
229
->expects ($ this ->exactly (3 ))
223
230
->method ('execute ' )
224
- ->withConsecutive ([$ cacheFlushCmd ], [$ setupDiCompileCmd ], [$ cacheFlushCmd ], [$ staticContentDeployCmd ])
225
- ->willReturn ("Compilation complete " );
231
+ ->willReturnCallback (function ($ arg ) use ($ cacheFlushCmd , $ setupDiCompileCmd , $ staticContentDeployCmd ) {
232
+ if ($ arg == $ cacheFlushCmd ||
233
+ $ arg == $ setupDiCompileCmd ||
234
+ $ arg == $ staticContentDeployCmd ) {
235
+ return "Compilation complete " ;
236
+ }
237
+ });
226
238
227
239
$ this ->initAdminLocaleMock (';echo ' );
228
240
0 commit comments