Skip to content

Commit 3e833b3

Browse files
committed
Revert changes in Tests
1 parent ac0f4e6 commit 3e833b3

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductInMultipleStoresTest.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
namespace Magento\GraphQl\Catalog;
99

10-
use Magento\PageCache\Model\Cache\Type as PageCache;
1110
use Magento\TestFramework\ObjectManager;
1211
use Magento\TestFramework\TestCase\GraphQlAbstract;
1312

@@ -77,8 +76,6 @@ public function testProductFromSpecificAndDefaultStore()
7776
'Product name in fixture store is invalid.'
7877
);
7978

80-
$this->flushPageCache();
81-
8279
//use case for default storeCode
8380
$nameInDefaultStore = 'Simple Product';
8481
$headerMapDefault = ['Store' => 'default'];
@@ -89,8 +86,6 @@ public function testProductFromSpecificAndDefaultStore()
8986
'Product name in default store is invalid.'
9087
);
9188

92-
$this->flushPageCache();
93-
9489
//use case for empty storeCode
9590
$headerMapEmpty = ['Store' => ''];
9691
$response = $this->graphQlQuery($query, [], '', $headerMapEmpty);
@@ -100,20 +95,11 @@ public function testProductFromSpecificAndDefaultStore()
10095
'Product in the default store should be returned'
10196
);
10297

103-
$this->flushPageCache();
104-
10598
// use case for invalid storeCode
10699
$nonExistingStoreCode = "non_existent_store";
107100
$headerMapInvalidStoreCode = ['Store' => $nonExistingStoreCode];
108101
$this->expectException(\Exception::class);
109102
$this->expectExceptionMessage('Requested store is not found');
110103
$this->graphQlQuery($query, [], '', $headerMapInvalidStoreCode);
111104
}
112-
113-
protected function flushPageCache(): void
114-
{
115-
/** @var PageCache $fullPageCache */
116-
$fullPageCache = ObjectManager::getInstance()->get(PageCache::class);
117-
$fullPageCache->clean();
118-
}
119105
}

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
namespace Magento\GraphQl\PageCache;
99

10-
use Magento\PageCache\Model\Cache\Type as PageCache;
1110
use Magento\TestFramework\ObjectManager;
1211
use Magento\TestFramework\TestCase\GraphQlAbstract;
1312

@@ -243,8 +242,6 @@ public function testProductFromSpecificAndDefaultStoreWithMultiCurrency()
243242
'Currency code EUR in fixture ' . $storeCodeFromFixture . ' is unexpected'
244243
);
245244

246-
$this->flushPageCache();
247-
248245
// test cached store + currency header in Euros
249246
$headerMap = ['Store' => $storeCodeFromFixture, 'Content-Currency' => 'EUR'];
250247
$response = $this->graphQlQuery($query, [], '', $headerMap);
@@ -259,8 +256,6 @@ public function testProductFromSpecificAndDefaultStoreWithMultiCurrency()
259256
'Currency code EUR in fixture ' . $storeCodeFromFixture . ' is unexpected'
260257
);
261258

262-
$this->flushPageCache();
263-
264259
// test non cached store + currency header in USD
265260
$headerMap = ['Store' => $storeCodeFromFixture, 'Content-Currency' => 'USD'];
266261
$response = $this->graphQlQuery($query, [], '', $headerMap);
@@ -275,8 +270,6 @@ public function testProductFromSpecificAndDefaultStoreWithMultiCurrency()
275270
'Currency code USD in fixture ' . $storeCodeFromFixture . ' is unexpected'
276271
);
277272

278-
$this->flushPageCache();
279-
280273
// test non cached store + currency header in USD not cached
281274
$headerMap = ['Store' => 'default', 'Content-Currency' => 'USD'];
282275
$response = $this->graphQlQuery($query, [], '', $headerMap);
@@ -291,8 +284,6 @@ public function testProductFromSpecificAndDefaultStoreWithMultiCurrency()
291284
'Currency code USD in fixture store default is unexpected'
292285
);
293286

294-
$this->flushPageCache();
295-
296287
// test non cached store + currency header in USD not cached
297288
$headerMap = ['Store' => 'default', 'Content-Currency' => 'EUR'];
298289
$response = $this->graphQlQuery($query, [], '', $headerMap);
@@ -307,8 +298,6 @@ public function testProductFromSpecificAndDefaultStoreWithMultiCurrency()
307298
'Currency code EUR in fixture store default is unexpected'
308299
);
309300

310-
$this->flushPageCache();
311-
312301
// test non cached store + currency header in USD cached
313302
$headerMap = ['Store' => 'default'];
314303
$response = $this->graphQlQuery($query, [], '', $headerMap);
@@ -323,21 +312,12 @@ public function testProductFromSpecificAndDefaultStoreWithMultiCurrency()
323312
'Currency code USD in fixture store default is unexpected'
324313
);
325314

326-
$this->flushPageCache();
327-
328315
// test cached response store + currency header with non existing currency, and no valid response, no cache
329316
$headerMap = ['Store' => $storeCodeFromFixture, 'Content-Currency' => 'SOMECURRENCY'];
330317
$this->expectExceptionMessage(
331318
'GraphQL response contains errors: Please correct the target currency'
332319
);
333-
334320
$this->graphQlQuery($query, [], '', $headerMap);
335321
}
336322

337-
protected function flushPageCache(): void
338-
{
339-
/** @var PageCache $fullPageCache */
340-
$fullPageCache = ObjectManager::getInstance()->get(PageCache::class);
341-
$fullPageCache->clean();
342-
}
343323
}

0 commit comments

Comments
 (0)