@@ -394,9 +394,9 @@ public function testInstall(array $request, array $logMessages)
394394 $ dataSetup ->expects ($ this ->any ())->method ('getConnection ' )->willReturn ($ connection );
395395 $ cacheManager = $ this ->createMock (Manager::class);
396396 $ cacheManager ->expects ($ this ->any ())->method ('getAvailableTypes ' )->willReturn (['foo ' , 'bar ' ]);
397- $ cacheManager ->expects ($ this ->exactly ( 3 ))->method ('setEnabled ' )->willReturn (['foo ' , 'bar ' ]);
398- $ cacheManager ->expects ($ this ->exactly (3 ))->method ('clean ' );
399- $ cacheManager ->expects ($ this ->exactly ( 3 ))->method ('getStatus ' )->willReturn (['foo ' => 1 , 'bar ' => 1 ]);
397+ $ cacheManager ->expects ($ this ->once ( ))->method ('setEnabled ' )->willReturn (['foo ' , 'bar ' ]);
398+ $ cacheManager ->expects ($ this ->exactly (2 ))->method ('clean ' );
399+ $ cacheManager ->expects ($ this ->once ( ))->method ('getStatus ' )->willReturn (['foo ' => 1 , 'bar ' => 1 ]);
400400 $ appState = $ this ->getMockBuilder (\Magento \Framework \App \State::class)
401401 ->disableOriginalConstructor ()
402402 ->disableArgumentCloning ()
@@ -524,15 +524,11 @@ public function installDataProvider()
524524 ['bar: 1 ' ],
525525 ['Installing data... ' ],
526526 ['Data install/update: ' ],
527- ['Disabling caches: ' ],
528- ['Current status: ' ],
529527 ['Module \'Foo_One \': ' ],
530528 ['Module \'Bar_Two \': ' ],
531529 ['Data post-updates: ' ],
532530 ['Module \'Foo_One \': ' ],
533531 ['Module \'Bar_Two \': ' ],
534- ['Enabling caches: ' ],
535- ['Current status: ' ],
536532 ['Caches clearing: ' ],
537533 ['Cache cleared successfully ' ],
538534 ['Disabling Maintenance Mode: ' ],
@@ -578,15 +574,11 @@ public function installDataProvider()
578574 ['bar: 1 ' ],
579575 ['Installing data... ' ],
580576 ['Data install/update: ' ],
581- ['Disabling caches: ' ],
582- ['Current status: ' ],
583577 ['Module \'Foo_One \': ' ],
584578 ['Module \'Bar_Two \': ' ],
585579 ['Data post-updates: ' ],
586580 ['Module \'Foo_One \': ' ],
587581 ['Module \'Bar_Two \': ' ],
588- ['Enabling caches: ' ],
589- ['Current status: ' ],
590582 ['Installing admin user... ' ],
591583 ['Caches clearing: ' ],
592584 ['Cache cleared successfully ' ],
@@ -678,9 +670,9 @@ public function testInstallWithOrderIncrementPrefix(array $request, array $logMe
678670 $ dataSetup ->expects ($ this ->any ())->method ('getConnection ' )->willReturn ($ connection );
679671 $ cacheManager = $ this ->createMock (Manager::class);
680672 $ cacheManager ->expects ($ this ->any ())->method ('getAvailableTypes ' )->willReturn (['foo ' , 'bar ' ]);
681- $ cacheManager ->expects ($ this ->exactly ( 3 ))->method ('setEnabled ' )->willReturn (['foo ' , 'bar ' ]);
682- $ cacheManager ->expects ($ this ->exactly (3 ))->method ('clean ' );
683- $ cacheManager ->expects ($ this ->exactly ( 3 ))->method ('getStatus ' )->willReturn (['foo ' => 1 , 'bar ' => 1 ]);
673+ $ cacheManager ->expects ($ this ->once ( ))->method ('setEnabled ' )->willReturn (['foo ' , 'bar ' ]);
674+ $ cacheManager ->expects ($ this ->exactly (2 ))->method ('clean ' );
675+ $ cacheManager ->expects ($ this ->once ( ))->method ('getStatus ' )->willReturn (['foo ' => 1 , 'bar ' => 1 ]);
684676 $ appState = $ this ->getMockBuilder (\Magento \Framework \App \State::class)
685677 ->disableOriginalConstructor ()
686678 ->disableArgumentCloning ()
@@ -815,15 +807,11 @@ public function installWithOrderIncrementPrefixDataProvider(): array
815807 ['bar: 1 ' ],
816808 ['Installing data... ' ],
817809 ['Data install/update: ' ],
818- ['Disabling caches: ' ],
819- ['Current status: ' ],
820810 ['Module \'Foo_One \': ' ],
821811 ['Module \'Bar_Two \': ' ],
822812 ['Data post-updates: ' ],
823813 ['Module \'Foo_One \': ' ],
824814 ['Module \'Bar_Two \': ' ],
825- ['Enabling caches: ' ],
826- ['Current status: ' ],
827815 ['Creating sales order increment prefix... ' ], // << added
828816 ['Caches clearing: ' ],
829817 ['Cache cleared successfully ' ],
@@ -1078,9 +1066,9 @@ public function testInstallWithUnresolvableRemoteStorageValidator()
10781066 $ dataSetup ->expects (static ::any ())->method ('getConnection ' )->willReturn ($ connection );
10791067 $ cacheManager = $ this ->createMock (Manager::class);
10801068 $ cacheManager ->expects (static ::any ())->method ('getAvailableTypes ' )->willReturn (['foo ' , 'bar ' ]);
1081- $ cacheManager ->expects (static ::exactly ( 3 ))->method ('setEnabled ' )->willReturn (['foo ' , 'bar ' ]);
1082- $ cacheManager ->expects (static ::exactly (3 ))->method ('clean ' );
1083- $ cacheManager ->expects (static ::exactly ( 3 ))->method ('getStatus ' )->willReturn (['foo ' => 1 , 'bar ' => 1 ]);
1069+ $ cacheManager ->expects (static ::once ( ))->method ('setEnabled ' )->willReturn (['foo ' , 'bar ' ]);
1070+ $ cacheManager ->expects (static ::exactly (2 ))->method ('clean ' );
1071+ $ cacheManager ->expects (static ::once ( ))->method ('getStatus ' )->willReturn (['foo ' => 1 , 'bar ' => 1 ]);
10841072 $ appState = $ this ->getMockBuilder (\Magento \Framework \App \State::class)
10851073 ->disableOriginalConstructor ()
10861074 ->disableArgumentCloning ()
@@ -1362,28 +1350,13 @@ public function installWithInvalidRemoteStorageConfigurationWithEarlyExceptionDa
13621350 /**
13631351 * Test for InstallDataFixtures
13641352 *
1365- * @dataProvider testInstallDataFixturesDataProvider
1366- *
1367- * @param bool $keepCache
1368- * @param array $expectedToEnableCacheTypes
13691353 * @return void
13701354 */
1371- public function testInstallDataFixtures (bool $ keepCache , array $ expectedToEnableCacheTypes ): void
1355+ public function testInstallDataFixtures (): void
13721356 {
13731357 $ this ->moduleList ->method ('getOne ' )->willReturn (['setup_version ' => '2.0.0 ' ]);
13741358
13751359 $ cacheManagerMock = $ this ->createMock (Manager::class);
1376- //simulate disabled layout cache type
1377- $ cacheManagerMock ->expects ($ this ->atLeastOnce ())
1378- ->method ('getStatus ' )
1379- ->willReturn (['layout ' => 0 ]);
1380- $ cacheManagerMock ->expects ($ this ->atLeastOnce ())
1381- ->method ('getAvailableTypes ' )
1382- ->willReturn (['block_html ' , 'full_page ' , 'layout ' , 'config ' , 'collections ' ]);
1383- $ cacheManagerMock ->expects ($ this ->exactly (2 ))
1384- ->method ('setEnabled ' )
1385- ->withConsecutive ([$ expectedToEnableCacheTypes , false ], [$ expectedToEnableCacheTypes , true ])
1386- ->willReturn ([]);
13871360
13881361 $ this ->objectManager ->expects ($ this ->atLeastOnce ())
13891362 ->method ('create ' )
@@ -1437,25 +1410,7 @@ public function testInstallDataFixtures(bool $keepCache, array $expectedToEnable
14371410 ->method ('create ' )
14381411 ->willReturn ($ dataSetup );
14391412
1440- $ this ->object ->installDataFixtures ($ this ->request , $ keepCache );
1441- }
1442-
1443- /**
1444- * DataProvider for testInstallDataFixtures
1445- *
1446- * @return array
1447- */
1448- public function testInstallDataFixturesDataProvider (): array
1449- {
1450- return [
1451- 'keep cache ' => [
1452- true , ['block_html ' , 'full_page ' ]
1453- ],
1454- 'do not keep a cache ' => [
1455- false ,
1456- ['block_html ' , 'full_page ' , 'layout ' ]
1457- ],
1458- ];
1413+ $ this ->object ->installDataFixtures ($ this ->request );
14591414 }
14601415
14611416 public function testCheckInstallationFilePermissions ()
0 commit comments