Skip to content

Commit 32cfe9a

Browse files
committed
B2B-2471: Defects in CatalogUrlResolverIdentity and CmsUrlResolverIdentity prevent caching
1 parent 1b10207 commit 32cfe9a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
/**
2323
* Test caching works for url route.
24+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2425
*/
2526
class RouteCacheTest extends GraphQLPageCacheAbstract
2627
{
@@ -131,7 +132,7 @@ public function testGetNonExistentUrlRewrite()
131132

132133
/** @var ProductRepositoryInterface $productRepository */
133134
$productRepository = $this->objectManager->get(ProductRepositoryInterface::class);
134-
$product = $productRepository->get($productSku, false, null, true);
135+
$productRepository->get($productSku, false, null, true);
135136

136137
/** @var UrlRewriteModel $urlRewriteModel */
137138
$urlRewriteModel = $this->objectManager->create(UrlRewriteModel::class);
@@ -147,7 +148,6 @@ public function testGetNonExistentUrlRewrite()
147148

148149
// Verify we obtain a cache HIT the second time around for this X-Magento-Cache-Id
149150
$this->assertCacheHit($routeQuery, [CacheIdCalculator::CACHE_ID_HEADER => $cacheId]);
150-
151151
}
152152

153153
/**
@@ -175,7 +175,7 @@ public function testCategoryUrlResolver()
175175
);
176176
$categoryId = $actualUrls->getEntityId();
177177
$categoryRepository = $this->objectManager->get(CategoryRepositoryInterface::class);
178-
$category = $categoryRepository->get($categoryId);
178+
$categoryRepository->get($categoryId);
179179

180180
$query
181181
= <<<QUERY
@@ -195,7 +195,6 @@ public function testCategoryUrlResolver()
195195

196196
// Verify we obtain a cache HIT the second time around for this X-Magento-Cache-Id
197197
$this->assertCacheHit($query, [CacheIdCalculator::CACHE_ID_HEADER => $cacheId]);
198-
199198
}
200199

201200
/**
@@ -207,7 +206,7 @@ public function testCMSPageUrlResolver()
207206
/** @var \Magento\Cms\Model\Page $page */
208207
$page = $this->objectManager->get(\Magento\Cms\Model\Page::class);
209208
$page->load('page100');
210-
$cmsPageData = $page->getData();
209+
$page->getData();
211210

212211
/** @var \Magento\CmsUrlRewrite\Model\CmsPageUrlPathGenerator $urlPathGenerator */
213212
$urlPathGenerator = $this->objectManager->get(\Magento\CmsUrlRewrite\Model\CmsPageUrlPathGenerator::class);
@@ -225,7 +224,6 @@ public function testCMSPageUrlResolver()
225224

226225
// Verify we obtain a cache HIT the second time around for this X-Magento-Cache-Id
227226
$this->assertCacheHit($routeQuery, [CacheIdCalculator::CACHE_ID_HEADER => $cacheId]);
228-
229227
}
230228

231229
/**

0 commit comments

Comments
 (0)