@@ -31,7 +31,7 @@ protected function setUp()
3131 }
3232
3333 /**
34- * Tests if target_path(relative_url ) is resolved for Product entity
34+ * Tests if target_path(canonical_url ) is resolved for Product entity
3535 *
3636 * @magentoApiDataFixture Magento/CatalogUrlRewrite/_files/product_with_category.php
3737 */
@@ -60,20 +60,20 @@ public function testProductUrlResolver()
6060 urlResolver(url:" {$ urlPath }")
6161 {
6262 id
63- relative_url
63+ canonical_url
6464 type
6565 }
6666}
6767QUERY ;
6868 $ response = $ this ->graphQlQuery ($ query );
6969 $ this ->assertArrayHasKey ('urlResolver ' , $ response );
7070 $ this ->assertEquals ($ product ->getEntityId (), $ response ['urlResolver ' ]['id ' ]);
71- $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['relative_url ' ]);
71+ $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['canonical_url ' ]);
7272 $ this ->assertEquals (strtoupper ($ expectedType ), $ response ['urlResolver ' ]['type ' ]);
7373 }
7474
7575 /**
76- * Tests the use case where relative_url is provided as resolver input in the Query
76+ * Tests the use case where canonical_url is provided as resolver input in the Query
7777 *
7878 * @magentoApiDataFixture Magento/CatalogUrlRewrite/_files/product_with_category.php
7979 */
@@ -104,15 +104,15 @@ public function testProductUrlWithCanonicalUrlInput()
104104 urlResolver(url:" {$ canonicalPath }")
105105 {
106106 id
107- relative_url
107+ canonical_url
108108 type
109109 }
110110}
111111QUERY ;
112112 $ response = $ this ->graphQlQuery ($ query );
113113 $ this ->assertArrayHasKey ('urlResolver ' , $ response );
114114 $ this ->assertEquals ($ product ->getEntityId (), $ response ['urlResolver ' ]['id ' ]);
115- $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['relative_url ' ]);
115+ $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['canonical_url ' ]);
116116 $ this ->assertEquals (strtoupper ($ expectedType ), $ response ['urlResolver ' ]['type ' ]);
117117 }
118118
@@ -147,15 +147,15 @@ public function testCategoryUrlResolver()
147147 urlResolver(url:" {$ urlPath2 }")
148148 {
149149 id
150- relative_url
150+ canonical_url
151151 type
152152 }
153153}
154154QUERY ;
155155 $ response = $ this ->graphQlQuery ($ query );
156156 $ this ->assertArrayHasKey ('urlResolver ' , $ response );
157157 $ this ->assertEquals ($ categoryId , $ response ['urlResolver ' ]['id ' ]);
158- $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['relative_url ' ]);
158+ $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['canonical_url ' ]);
159159 $ this ->assertEquals (strtoupper ($ expectedType ), $ response ['urlResolver ' ]['type ' ]);
160160 }
161161
@@ -183,14 +183,14 @@ public function testCMSPageUrlResolver()
183183 urlResolver(url:" {$ requestPath }")
184184 {
185185 id
186- relative_url
186+ canonical_url
187187 type
188188 }
189189}
190190QUERY ;
191191 $ response = $ this ->graphQlQuery ($ query );
192192 $ this ->assertEquals ($ cmsPageId , $ response ['urlResolver ' ]['id ' ]);
193- $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['relative_url ' ]);
193+ $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['canonical_url ' ]);
194194 $ this ->assertEquals (strtoupper (str_replace ('- ' , '_ ' , $ expectedEntityType )), $ response ['urlResolver ' ]['type ' ]);
195195 }
196196
@@ -226,15 +226,15 @@ public function testProductUrlRewriteResolver()
226226 urlResolver(url:" {$ urlPath }")
227227 {
228228 id
229- relative_url
229+ canonical_url
230230 type
231231 }
232232}
233233QUERY ;
234234 $ response = $ this ->graphQlQuery ($ query );
235235 $ this ->assertArrayHasKey ('urlResolver ' , $ response );
236236 $ this ->assertEquals ($ product ->getEntityId (), $ response ['urlResolver ' ]['id ' ]);
237- $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['relative_url ' ]);
237+ $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['canonical_url ' ]);
238238 $ this ->assertEquals (strtoupper ($ expectedType ), $ response ['urlResolver ' ]['type ' ]);
239239 }
240240
@@ -266,7 +266,7 @@ public function testInvalidUrlResolverInput()
266266 urlResolver(url:" {$ urlPath }")
267267 {
268268 id
269- relative_url
269+ canonical_url
270270 type
271271 }
272272}
@@ -307,15 +307,15 @@ public function testCategoryUrlWithLeadingSlash()
307307 urlResolver(url:"/ {$ urlPath }")
308308 {
309309 id
310- relative_url
310+ canonical_url
311311 type
312312 }
313313}
314314QUERY ;
315315 $ response = $ this ->graphQlQuery ($ query );
316316 $ this ->assertArrayHasKey ('urlResolver ' , $ response );
317317 $ this ->assertEquals ($ categoryId , $ response ['urlResolver ' ]['id ' ]);
318- $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['relative_url ' ]);
318+ $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['canonical_url ' ]);
319319 $ this ->assertEquals (strtoupper ($ expectedType ), $ response ['urlResolver ' ]['type ' ]);
320320 }
321321
@@ -344,15 +344,15 @@ public function testResolveSlash()
344344 urlResolver(url:"/")
345345 {
346346 id
347- relative_url
347+ canonical_url
348348 type
349349 }
350350}
351351QUERY ;
352352 $ response = $ this ->graphQlQuery ($ query );
353353 $ this ->assertArrayHasKey ('urlResolver ' , $ response );
354354 $ this ->assertEquals ($ homePageId , $ response ['urlResolver ' ]['id ' ]);
355- $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['relative_url ' ]);
355+ $ this ->assertEquals ($ targetPath , $ response ['urlResolver ' ]['canonical_url ' ]);
356356 $ this ->assertEquals ('CMS_PAGE ' , $ response ['urlResolver ' ]['type ' ]);
357357 }
358358}
0 commit comments