Skip to content

Commit 75a191d

Browse files
committed
LYNX-232: Fix WebAPI tests
1 parent 7834eca commit 75a191d

File tree

1 file changed

+7
-5
lines changed
  • dev/tests/api-functional/testsuite/Magento/GraphQl/PageCache

1 file changed

+7
-5
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/PageCache/VarnishTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ public function testCacheResultForGuest()
5959
*/
6060
#[
6161
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'),
6365
DataFixture(Product::class, as: 'product')
6466
]
6567
public function testCacheResultForGuestWithStoreHeader()
@@ -126,7 +128,7 @@ public function testCacheResultForGuestWithStoreHeader()
126128
*/
127129
#[
128130
ConfigFixture(Config::XML_PAGECACHE_TYPE, Config::VARNISH),
129-
ConfigFixture(Currency::XML_PATH_CURRENCY_ALLOW, 'EUR'),
131+
ConfigFixture(Currency::XML_PATH_CURRENCY_ALLOW, 'EUR,USD'),
130132
DataFixture(Product::class, as: 'product')
131133
]
132134
public function testCacheResultForGuestWithCurrencyHeader()
@@ -160,21 +162,21 @@ public function testCacheResultForGuestWithCurrencyHeader()
160162
'',
161163
[
162164
CacheIdCalculator::CACHE_ID_HEADER => $defaultCurrencyCacheId,
163-
'Content-Currency' => 'EUR'
165+
'Content-Currency' => 'USD'
164166
]
165167
);
166168
$secondCurrencyCacheId = $secondCurrencyResponse['headers'][CacheIdCalculator::CACHE_ID_HEADER];
167169

168170
// Verify we obtain a cache MISS the first time we search by this X-Magento-Cache-Id
169171
$this->assertCacheMissAndReturnResponse($query, [
170172
CacheIdCalculator::CACHE_ID_HEADER => $secondCurrencyCacheId,
171-
'Content-Currency' => 'EUR'
173+
'Content-Currency' => 'USD'
172174
]);
173175

174176
// Verify we obtain a cache HIT the second time around with the changed currency header
175177
$this->assertCacheHitAndReturnResponse($query, [
176178
CacheIdCalculator::CACHE_ID_HEADER => $secondCurrencyCacheId,
177-
'Content-Currency' => 'EUR'
179+
'Content-Currency' => 'USD'
178180
]);
179181

180182
// Verify we still obtain a cache HIT for the default currency ( no Content-Currency header)

0 commit comments

Comments
 (0)