Skip to content

Commit 19f354c

Browse files
committed
MC-21491: Pricing :: FPT display settings
- fix test
1 parent ae419ab commit 19f354c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogUrlRewrite/UrlResolverTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function testProductUrlResolver()
6868
$relativePath = $actualUrls->getRequestPath();
6969
$expectedType = $actualUrls->getEntityType();
7070

71-
$this->assertResponseFromGraphQl(
71+
$this->queryUrlAndAssertResponse(
7272
(int) $product->getEntityId(),
7373
$urlPath,
7474
$relativePath,
@@ -117,7 +117,7 @@ public function testProductUrlWithNonSeoFriendlyUrlInput()
117117
$expectedType = $actualUrls->getEntityType();
118118
$nonSeoFriendlyPath = $actualUrls->getTargetPath();
119119

120-
$this->assertResponseFromGraphQl(
120+
$this->queryUrlAndAssertResponse(
121121
(int) $product->getEntityId(),
122122
$nonSeoFriendlyPath,
123123
$relativePath,
@@ -168,15 +168,15 @@ public function testRedirectsAndCustomInput()
168168
]
169169
);
170170
// querying the end redirect gives the same record
171-
$this->assertResponseFromGraphQl(
171+
$this->queryUrlAndAssertResponse(
172172
(int) $product->getEntityId(),
173173
$renamedKey . $suffix,
174174
$actualUrls->getRequestPath(),
175175
$actualUrls->getEntityType()
176176
);
177177

178178
// querying a url that's a redirect the active redirected final url
179-
$this->assertResponseFromGraphQl(
179+
$this->queryUrlAndAssertResponse(
180180
(int) $product->getEntityId(),
181181
$productSku . $suffix,
182182
$actualUrls->getRequestPath(),
@@ -205,7 +205,7 @@ public function testRedirectsAndCustomInput()
205205
$urlRewriteModel->save();
206206

207207
// querying a custom url that should return the target entity but relative should be the custom url
208-
$this->assertResponseFromGraphQl(
208+
$this->queryUrlAndAssertResponse(
209209
(int) $product->getEntityId(),
210210
$customUrl,
211211
$customUrl,
@@ -220,7 +220,7 @@ public function testRedirectsAndCustomInput()
220220
ObjectManager::getInstance()->get(\Magento\TestFramework\Helper\CacheCleaner::class)->cleanAll();
221221

222222
//modifying query by adding spaces to avoid getting cached values.
223-
$this->assertResponseFromGraphQl(
223+
$this->queryUrlAndAssertResponse(
224224
(int) $product->getEntityId(),
225225
$customUrl,
226226
$actualUrls->getRequestPath(),
@@ -267,7 +267,7 @@ public function testCategoryUrlResolver()
267267
$response = $this->graphQlQuery($query);
268268
$urlPath = $response['category']['url_key'] . $response['category']['url_suffix'];
269269

270-
$this->assertResponseFromGraphQl(
270+
$this->queryUrlAndAssertResponse(
271271
(int) $categoryId,
272272
$urlPath,
273273
$relativePath,
@@ -317,7 +317,7 @@ public function testProductUrlRewriteResolver()
317317
$relativePath = $actualUrls->getRequestPath();
318318
$expectedType = $actualUrls->getEntityType();
319319

320-
$this->assertResponseFromGraphQl(
320+
$this->queryUrlAndAssertResponse(
321321
(int) $product->getEntityId(),
322322
$urlPath,
323323
$relativePath,
@@ -401,7 +401,7 @@ public function testCategoryUrlWithLeadingSlash()
401401
$response = $this->graphQlQuery($query);
402402
$urlPath = $response['category']['url_key'] . $response['category']['url_suffix'];
403403

404-
$this->assertResponseFromGraphQl(
404+
$this->queryUrlAndAssertResponse(
405405
(int) $categoryId,
406406
$urlPath,
407407
$relativePath,
@@ -455,7 +455,7 @@ public function testGetNonExistentUrlRewrite()
455455
* @param string $relativePath
456456
* @param string $expectedType
457457
*/
458-
private function assertResponseFromGraphQl(
458+
private function queryUrlAndAssertResponse(
459459
int $productId,
460460
string $urlKey,
461461
string $relativePath,

0 commit comments

Comments
 (0)