21
21
22
22
/**
23
23
* Test caching works for url route.
24
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
24
25
*/
25
26
class RouteCacheTest extends GraphQLPageCacheAbstract
26
27
{
@@ -131,7 +132,7 @@ public function testGetNonExistentUrlRewrite()
131
132
132
133
/** @var ProductRepositoryInterface $productRepository */
133
134
$ productRepository = $ this ->objectManager ->get (ProductRepositoryInterface::class);
134
- $ product = $ productRepository ->get ($ productSku , false , null , true );
135
+ $ productRepository ->get ($ productSku , false , null , true );
135
136
136
137
/** @var UrlRewriteModel $urlRewriteModel */
137
138
$ urlRewriteModel = $ this ->objectManager ->create (UrlRewriteModel::class);
@@ -147,7 +148,6 @@ public function testGetNonExistentUrlRewrite()
147
148
148
149
// Verify we obtain a cache HIT the second time around for this X-Magento-Cache-Id
149
150
$ this ->assertCacheHit ($ routeQuery , [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]);
150
-
151
151
}
152
152
153
153
/**
@@ -175,7 +175,7 @@ public function testCategoryUrlResolver()
175
175
);
176
176
$ categoryId = $ actualUrls ->getEntityId ();
177
177
$ categoryRepository = $ this ->objectManager ->get (CategoryRepositoryInterface::class);
178
- $ category = $ categoryRepository ->get ($ categoryId );
178
+ $ categoryRepository ->get ($ categoryId );
179
179
180
180
$ query
181
181
= <<<QUERY
@@ -195,7 +195,6 @@ public function testCategoryUrlResolver()
195
195
196
196
// Verify we obtain a cache HIT the second time around for this X-Magento-Cache-Id
197
197
$ this ->assertCacheHit ($ query , [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]);
198
-
199
198
}
200
199
201
200
/**
@@ -207,7 +206,7 @@ public function testCMSPageUrlResolver()
207
206
/** @var \Magento\Cms\Model\Page $page */
208
207
$ page = $ this ->objectManager ->get (\Magento \Cms \Model \Page::class);
209
208
$ page ->load ('page100 ' );
210
- $ cmsPageData = $ page ->getData ();
209
+ $ page ->getData ();
211
210
212
211
/** @var \Magento\CmsUrlRewrite\Model\CmsPageUrlPathGenerator $urlPathGenerator */
213
212
$ urlPathGenerator = $ this ->objectManager ->get (\Magento \CmsUrlRewrite \Model \CmsPageUrlPathGenerator::class);
@@ -225,7 +224,6 @@ public function testCMSPageUrlResolver()
225
224
226
225
// Verify we obtain a cache HIT the second time around for this X-Magento-Cache-Id
227
226
$ this ->assertCacheHit ($ routeQuery , [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]);
228
-
229
227
}
230
228
231
229
/**
0 commit comments