@@ -59,7 +59,9 @@ public function testCacheResultForGuest()
59
59
*/
60
60
#[
61
61
ConfigFixture(Config::XML_PAGECACHE_TYPE , Config::VARNISH ),
62
- DataFixture(Store::class, as: 'fixture_second_store ' ),
62
+ DataFixture(Store::class, [
63
+ 'name ' => 'fixture_second_store '
64
+ ], 'fixture_second_store ' ),
63
65
DataFixture(Product::class, as: 'product ' )
64
66
]
65
67
public function testCacheResultForGuestWithStoreHeader ()
@@ -126,7 +128,7 @@ public function testCacheResultForGuestWithStoreHeader()
126
128
*/
127
129
#[
128
130
ConfigFixture(Config::XML_PAGECACHE_TYPE , Config::VARNISH ),
129
- ConfigFixture(Currency::XML_PATH_CURRENCY_ALLOW , 'EUR ' ),
131
+ ConfigFixture(Currency::XML_PATH_CURRENCY_ALLOW , 'EUR,USD ' ),
130
132
DataFixture(Product::class, as: 'product ' )
131
133
]
132
134
public function testCacheResultForGuestWithCurrencyHeader ()
@@ -160,21 +162,21 @@ public function testCacheResultForGuestWithCurrencyHeader()
160
162
'' ,
161
163
[
162
164
CacheIdCalculator::CACHE_ID_HEADER => $ defaultCurrencyCacheId ,
163
- 'Content-Currency ' => 'EUR '
165
+ 'Content-Currency ' => 'USD '
164
166
]
165
167
);
166
168
$ secondCurrencyCacheId = $ secondCurrencyResponse ['headers ' ][CacheIdCalculator::CACHE_ID_HEADER ];
167
169
168
170
// Verify we obtain a cache MISS the first time we search by this X-Magento-Cache-Id
169
171
$ this ->assertCacheMissAndReturnResponse ($ query , [
170
172
CacheIdCalculator::CACHE_ID_HEADER => $ secondCurrencyCacheId ,
171
- 'Content-Currency ' => 'EUR '
173
+ 'Content-Currency ' => 'USD '
172
174
]);
173
175
174
176
// Verify we obtain a cache HIT the second time around with the changed currency header
175
177
$ this ->assertCacheHitAndReturnResponse ($ query , [
176
178
CacheIdCalculator::CACHE_ID_HEADER => $ secondCurrencyCacheId ,
177
- 'Content-Currency ' => 'EUR '
179
+ 'Content-Currency ' => 'USD '
178
180
]);
179
181
180
182
// Verify we still obtain a cache HIT for the default currency ( no Content-Currency header)
0 commit comments