File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
dev/tests/api-functional/testsuite/Magento/Catalog/Api Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -269,20 +269,21 @@ public function testUpdate()
269269 $ this ->createdCategories = [$ categoryId ];
270270 }
271271
272- /**
273- * @magentoApiDataFixture Magento/Catalog/_files/ category.php
274- */
272+ #[
273+ DataFixture(CategoryFixture::class, as: ' category ' )
274+ ]
275275 public function testUpdateWithDefaultSortByAttribute ()
276276 {
277- $ categoryId = 333 ;
277+ $ category = $ this ->fixtures ->get ('category ' );
278+ $ categoryId = $ category ->getId ();
278279 $ categoryData = [
279280 'name ' => 'Update Category Test With default_sort_by Attribute ' ,
280281 'is_active ' => true ,
281282 "available_sort_by " => [],
282283 'custom_attributes ' => [
283284 [
284285 'attribute_code ' => 'default_sort_by ' ,
285- 'value ' => [ " name " ],
286+ 'value ' => " price "
286287 ],
287288 ],
288289 ];
@@ -293,7 +294,7 @@ public function testUpdateWithDefaultSortByAttribute()
293294 $ category = $ model ->load ($ categoryId );
294295 $ this ->assertTrue ((bool )$ category ->getIsActive (), 'Category "is_active" must equal to true ' );
295296 $ this ->assertEquals ("Update Category Test With default_sort_by Attribute " , $ category ->getName ());
296- $ this ->assertEquals ("name " , $ category ->getDefaultSortBy ());
297+ $ this ->assertEquals ("price " , $ category ->getDefaultSortBy ());
297298 $ this ->createdCategories = [$ categoryId ];
298299 }
299300
You can’t perform that action at this time.
0 commit comments