@@ -1083,7 +1083,8 @@ public function testCachePurgedAfterStoreGroupSwitchedWebsite(): void
10831083 $ currentStoreGroupQuery = $ this ->getQuery ('true ' );
10841084 $ responseDefaultStoreCurrentStoreGroup = $ this ->graphQlQueryWithResponseHeaders ($ currentStoreGroupQuery );
10851085 $ this ->assertArrayHasKey (CacheIdCalculator::CACHE_ID_HEADER , $ responseDefaultStoreCurrentStoreGroup ['headers ' ]);
1086- $ defaultStoreCurrentStoreGroupCacheId = $ responseDefaultStoreCurrentStoreGroup ['headers ' ][CacheIdCalculator::CACHE_ID_HEADER ];
1086+ $ defaultStoreCurrentStoreGroupCacheId =
1087+ $ responseDefaultStoreCurrentStoreGroup ['headers ' ][CacheIdCalculator::CACHE_ID_HEADER ];
10871088 // Verify we obtain a cache MISS at the 1st time
10881089 $ this ->assertCacheMissAndReturnResponse (
10891090 $ currentStoreGroupQuery ,
@@ -1314,7 +1315,8 @@ public function testCachePurgedAfterStoreSwitchedStoreGroup(): void
13141315 $ currentStoreGroupQuery = $ this ->getQuery ('true ' );
13151316 $ responseDefaultStoreCurrentStoreGroup = $ this ->graphQlQueryWithResponseHeaders ($ currentStoreGroupQuery );
13161317 $ this ->assertArrayHasKey (CacheIdCalculator::CACHE_ID_HEADER , $ responseDefaultStoreCurrentStoreGroup ['headers ' ]);
1317- $ defaultStoreCurrentStoreGroupCacheId = $ responseDefaultStoreCurrentStoreGroup ['headers ' ][CacheIdCalculator::CACHE_ID_HEADER ];
1318+ $ defaultStoreCurrentStoreGroupCacheId =
1319+ $ responseDefaultStoreCurrentStoreGroup ['headers ' ][CacheIdCalculator::CACHE_ID_HEADER ];
13181320 // Verify we obtain a cache MISS at the 1st time
13191321 $ this ->assertCacheMissAndReturnResponse (
13201322 $ currentStoreGroupQuery ,
@@ -1414,6 +1416,9 @@ public function testCachePurgedAfterStoreSwitchedStoreGroup(): void
14141416 /** @var Store $store */
14151417 $ store = $ this ->objectManager ->create (Store::class);
14161418 $ store ->load ($ secondStoreCode , 'code ' );
1419+ $ store ->setStoreGroupId ($ storeGroup ->getId ());
1420+ $ store ->setWebsiteId ($ storeGroup ->getWebsiteId ());
1421+ $ store ->save ();
14171422
14181423 // Query available stores of default store's website
14191424 // after second store switched from second store group to main_website_store store group
0 commit comments