@@ -68,7 +68,7 @@ public function testProductUrlResolver()
68
68
$ relativePath = $ actualUrls ->getRequestPath ();
69
69
$ expectedType = $ actualUrls ->getEntityType ();
70
70
71
- $ this ->assertResponseFromGraphQl (
71
+ $ this ->queryUrlAndAssertResponse (
72
72
(int ) $ product ->getEntityId (),
73
73
$ urlPath ,
74
74
$ relativePath ,
@@ -117,7 +117,7 @@ public function testProductUrlWithNonSeoFriendlyUrlInput()
117
117
$ expectedType = $ actualUrls ->getEntityType ();
118
118
$ nonSeoFriendlyPath = $ actualUrls ->getTargetPath ();
119
119
120
- $ this ->assertResponseFromGraphQl (
120
+ $ this ->queryUrlAndAssertResponse (
121
121
(int ) $ product ->getEntityId (),
122
122
$ nonSeoFriendlyPath ,
123
123
$ relativePath ,
@@ -168,15 +168,15 @@ public function testRedirectsAndCustomInput()
168
168
]
169
169
);
170
170
// querying the end redirect gives the same record
171
- $ this ->assertResponseFromGraphQl (
171
+ $ this ->queryUrlAndAssertResponse (
172
172
(int ) $ product ->getEntityId (),
173
173
$ renamedKey . $ suffix ,
174
174
$ actualUrls ->getRequestPath (),
175
175
$ actualUrls ->getEntityType ()
176
176
);
177
177
178
178
// querying a url that's a redirect the active redirected final url
179
- $ this ->assertResponseFromGraphQl (
179
+ $ this ->queryUrlAndAssertResponse (
180
180
(int ) $ product ->getEntityId (),
181
181
$ productSku . $ suffix ,
182
182
$ actualUrls ->getRequestPath (),
@@ -205,7 +205,7 @@ public function testRedirectsAndCustomInput()
205
205
$ urlRewriteModel ->save ();
206
206
207
207
// querying a custom url that should return the target entity but relative should be the custom url
208
- $ this ->assertResponseFromGraphQl (
208
+ $ this ->queryUrlAndAssertResponse (
209
209
(int ) $ product ->getEntityId (),
210
210
$ customUrl ,
211
211
$ customUrl ,
@@ -220,7 +220,7 @@ public function testRedirectsAndCustomInput()
220
220
ObjectManager::getInstance ()->get (\Magento \TestFramework \Helper \CacheCleaner::class)->cleanAll ();
221
221
222
222
//modifying query by adding spaces to avoid getting cached values.
223
- $ this ->assertResponseFromGraphQl (
223
+ $ this ->queryUrlAndAssertResponse (
224
224
(int ) $ product ->getEntityId (),
225
225
$ customUrl ,
226
226
$ actualUrls ->getRequestPath (),
@@ -267,7 +267,7 @@ public function testCategoryUrlResolver()
267
267
$ response = $ this ->graphQlQuery ($ query );
268
268
$ urlPath = $ response ['category ' ]['url_key ' ] . $ response ['category ' ]['url_suffix ' ];
269
269
270
- $ this ->assertResponseFromGraphQl (
270
+ $ this ->queryUrlAndAssertResponse (
271
271
(int ) $ categoryId ,
272
272
$ urlPath ,
273
273
$ relativePath ,
@@ -317,7 +317,7 @@ public function testProductUrlRewriteResolver()
317
317
$ relativePath = $ actualUrls ->getRequestPath ();
318
318
$ expectedType = $ actualUrls ->getEntityType ();
319
319
320
- $ this ->assertResponseFromGraphQl (
320
+ $ this ->queryUrlAndAssertResponse (
321
321
(int ) $ product ->getEntityId (),
322
322
$ urlPath ,
323
323
$ relativePath ,
@@ -401,7 +401,7 @@ public function testCategoryUrlWithLeadingSlash()
401
401
$ response = $ this ->graphQlQuery ($ query );
402
402
$ urlPath = $ response ['category ' ]['url_key ' ] . $ response ['category ' ]['url_suffix ' ];
403
403
404
- $ this ->assertResponseFromGraphQl (
404
+ $ this ->queryUrlAndAssertResponse (
405
405
(int ) $ categoryId ,
406
406
$ urlPath ,
407
407
$ relativePath ,
@@ -455,7 +455,7 @@ public function testGetNonExistentUrlRewrite()
455
455
* @param string $relativePath
456
456
* @param string $expectedType
457
457
*/
458
- private function assertResponseFromGraphQl (
458
+ private function queryUrlAndAssertResponse (
459
459
int $ productId ,
460
460
string $ urlKey ,
461
461
string $ relativePath ,
0 commit comments