2121
2222/**
2323 * Test caching works for url route.
24+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2425 */
2526class 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