@@ -96,11 +96,8 @@ public function testCacheTagForCategoriesWithProduct()
96
96
// cache-debug header value should be a MISS when category is loaded first time
97
97
$ responseMissOnCategoryQuery = $ this ->graphQlQueryWithResponseHeaders ($ categoryQuery , $ categoryQueryVariables );
98
98
$ this ->assertArrayHasKey (CacheIdCalculator::CACHE_ID_HEADER , $ responseMissOnCategoryQuery ['headers ' ]);
99
- $ cacheId = $ responseMissOnCategoryQuery ['headers ' ][CacheIdCalculator::CACHE_ID_HEADER ];
100
- // Verify we obtain a cache MISS the first time we search the cache using this X-Magento-Cache-Id
101
- $ this ->assertCacheMissAndReturnResponse ($ categoryQuery , [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]);
102
- // Verify we obtain a cache HIT the second time around for this X-Magento-Cache-Id
103
- $ this ->assertCacheHitAndReturnResponse ($ categoryQuery , [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]);
99
+ $ this ->assertArrayHasKey ('X-Magento-Cache-Debug ' , $ responseMissOnCategoryQuery ['headers ' ]);
100
+ $ this ->assertEquals ('MISS ' , $ responseMissOnCategoryQuery ['headers ' ]['X-Magento-Cache-Debug ' ]);
104
101
105
102
// Cache-debug header should be a MISS for product 1 on first request
106
103
$ responseFirstProduct = $ this ->graphQlQueryWithResponseHeaders ($ product1Query );
@@ -120,9 +117,8 @@ public function testCacheTagForCategoriesWithProduct()
120
117
$ categoryQueryVariables
121
118
);
122
119
$ this ->assertArrayHasKey (CacheIdCalculator::CACHE_ID_HEADER , $ responseMissCategoryAfterUpdate ['headers ' ]);
123
- $ cacheId = $ responseMissCategoryAfterUpdate ['headers ' ][CacheIdCalculator::CACHE_ID_HEADER ];
124
- // Verify we obtain a cache MISS the first time we search the cache using this X-Magento-Cache-Id
125
- $ this ->assertCacheMissAndReturnResponse ($ categoryQuery , [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]);
120
+ $ this ->assertArrayHasKey ('X-Magento-Cache-Debug ' , $ responseMissOnCategoryQuery ['headers ' ]);
121
+ $ this ->assertEquals ('MISS ' , $ responseMissOnCategoryQuery ['headers ' ]['X-Magento-Cache-Debug ' ]);
126
122
127
123
// cache-debug should be a MISS for product 1 after it is updated - cache invalidation
128
124
$ responseMissFirstProductAfterUpdate = $ this ->graphQlQueryWithResponseHeaders ($ product1Query );
0 commit comments