@@ -162,6 +162,7 @@ public function testApplyDataPatchForNewlyInstalledModule($moduleName, $dataPatc
162
162
// phpstan:ignore
163
163
$ patches = [
164
164
\SomeDataPatch::class,
165
+ // phpstan:ignore
165
166
\OtherDataPatch::class
166
167
];
167
168
$ patchRegistryMock = $ this ->createAggregateIteratorMock (PatchRegistry::class, $ patches , ['registerPatch ' ]);
@@ -180,10 +181,11 @@ public function testApplyDataPatchForNewlyInstalledModule($moduleName, $dataPatc
180
181
$ patch2 ->expects ($ this ->once ())->method ('apply ' );
181
182
$ patch2 ->expects ($ this ->once ())->method ('getAliases ' )->willReturn ([]);
182
183
183
- // phpstan:ignore
184
184
$ this ->objectManagerMock ->expects ($ this ->any ())->method ('create ' )->willReturnMap (
185
185
[
186
+ // phpstan:ignore
186
187
['\\' . \SomeDataPatch::class, ['moduleDataSetup ' => $ this ->moduleDataSetupMock ], $ patch1 ],
188
+ // phpstan:ignore
187
189
['\\' . \OtherDataPatch::class, ['moduleDataSetup ' => $ this ->moduleDataSetupMock ], $ patch2 ],
188
190
]
189
191
);
@@ -243,12 +245,13 @@ public function testApplyDataPatchForAlias($moduleName, $dataPatches, $moduleVer
243
245
*/
244
246
public function applyDataPatchDataNewModuleProvider ()
245
247
{
246
- // phpstan:ignore
247
248
return [
248
249
'newly installed module ' => [
249
250
'moduleName ' => 'Module1 ' ,
250
251
'dataPatches ' => [
252
+ // phpstan:ignore
251
253
\SomeDataPatch::class,
254
+ // phpstan:ignore
252
255
\OtherDataPatch::class
253
256
],
254
257
'moduleVersionInDb ' => null ,
@@ -279,6 +282,7 @@ public function testApplyDataPatchForInstalledModule($moduleName, $dataPatches,
279
282
// phpstan:ignore
280
283
$ patches = [
281
284
\SomeDataPatch::class,
285
+ // phpstan:ignore
282
286
\OtherDataPatch::class
283
287
];
284
288
$ patchRegistryMock = $ this ->createAggregateIteratorMock (
@@ -302,10 +306,11 @@ public function testApplyDataPatchForInstalledModule($moduleName, $dataPatches,
302
306
$ patch2 ->expects (self ::once ())->method ('apply ' );
303
307
$ patch2 ->expects (self ::any ())->method ('getAliases ' )->willReturn ([]);
304
308
305
- // phpstan:ignore
306
309
$ this ->objectManagerMock ->expects (self ::any ())->method ('create ' )->willReturnMap (
307
310
[
311
+ // phpstan:ignore
308
312
['\\' . \SomeDataPatch::class, ['moduleDataSetup ' => $ this ->moduleDataSetupMock ], $ patch1 ],
313
+ // phpstan:ignore
309
314
['\\' . \OtherDataPatch::class, ['moduleDataSetup ' => $ this ->moduleDataSetupMock ], $ patch2 ],
310
315
]
311
316
);
@@ -320,12 +325,13 @@ public function testApplyDataPatchForInstalledModule($moduleName, $dataPatches,
320
325
*/
321
326
public function applyDataPatchDataInstalledModuleProvider ()
322
327
{
323
- // phpstan:ignore
324
328
return [
325
329
'upgrade module iwth only OtherDataPatch ' => [
326
330
'moduleName ' => 'Module1 ' ,
327
331
'dataPatches ' => [
332
+ // phpstan:ignore
328
333
\SomeDataPatch::class,
334
+ // phpstan:ignore
329
335
\OtherDataPatch::class
330
336
],
331
337
'moduleVersionInDb ' => '2.0.0 ' ,
@@ -359,6 +365,7 @@ public function testApplyDataPatchRollback($moduleName, $dataPatches, $moduleVer
359
365
// phpstan:ignore
360
366
$ patches = [
361
367
\SomeDataPatch::class,
368
+ // phpstan:ignore
362
369
\OtherDataPatch::class
363
370
];
364
371
$ patchRegistryMock = $ this ->createAggregateIteratorMock (PatchRegistry::class, $ patches , ['registerPatch ' ]);
@@ -376,10 +383,12 @@ public function testApplyDataPatchRollback($moduleName, $dataPatches, $moduleVer
376
383
$ patch2 = $ this ->createMock (\OtherDataPatch::class);
377
384
$ exception = new \Exception ('Patch Apply Error ' );
378
385
$ patch2 ->expects ($ this ->once ())->method ('apply ' )->willThrowException ($ exception );
379
- // phpstan:ignore
386
+
380
387
$ this ->objectManagerMock ->expects ($ this ->any ())->method ('create ' )->willReturnMap (
381
388
[
389
+ // phpstan:ignore
382
390
['\\' . \SomeDataPatch::class, ['moduleDataSetup ' => $ this ->moduleDataSetupMock ], $ patch1 ],
391
+ // phpstan:ignore
383
392
['\\' . \OtherDataPatch::class, ['moduleDataSetup ' => $ this ->moduleDataSetupMock ], $ patch2 ],
384
393
]
385
394
);
@@ -485,6 +494,7 @@ public function testSchemaPatchAplly($moduleName, $schemaPatches, $moduleVersion
485
494
// phpstan:ignore
486
495
$ patches = [
487
496
\SomeSchemaPatch::class,
497
+ // phpstan:ignore
488
498
\OtherSchemaPatch::class
489
499
];
490
500
$ patchRegistryMock = $ this ->createAggregateIteratorMock (PatchRegistry::class, $ patches , ['registerPatch ' ]);
@@ -503,10 +513,11 @@ public function testSchemaPatchAplly($moduleName, $schemaPatches, $moduleVersion
503
513
$ patch2 = $ this ->createMock (\OtherSchemaPatch::class);
504
514
$ patch2 ->expects ($ this ->once ())->method ('apply ' );
505
515
$ patch2 ->expects ($ this ->any ())->method ('getAliases ' )->willReturn ([]);
506
- // phpstan:ignore
507
516
$ this ->patchFactoryMock ->expects ($ this ->any ())->method ('create ' )->willReturnMap (
508
517
[
518
+ // phpstan:ignore
509
519
[\SomeSchemaPatch::class, ['schemaSetup ' => $ this ->schemaSetupMock ], $ patch1 ],
520
+ // phpstan:ignore
510
521
[\OtherSchemaPatch::class, ['schemaSetup ' => $ this ->schemaSetupMock ], $ patch2 ],
511
522
]
512
523
);
@@ -599,12 +610,13 @@ public function testRevertDataPatches()
599
610
*/
600
611
public function schemaPatchDataProvider ()
601
612
{
602
- // phpstan:ignore
603
613
return [
604
614
'upgrade module iwth only OtherSchemaPatch ' => [
605
615
'moduleName ' => 'Module1 ' ,
606
616
'schemaPatches ' => [
617
+ // phpstan:ignore
607
618
\SomeSchemaPatch::class,
619
+ // phpstan:ignore
608
620
\OtherSchemaPatch::class
609
621
],
610
622
'moduleVersionInDb ' => '2.0.0 ' ,
0 commit comments