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()
269
269
$ this ->createdCategories = [$ categoryId ];
270
270
}
271
271
272
- /**
273
- * @magentoApiDataFixture Magento/Catalog/_files/ category.php
274
- */
272
+ #[
273
+ DataFixture(CategoryFixture::class, as: ' category ' )
274
+ ]
275
275
public function testUpdateWithDefaultSortByAttribute ()
276
276
{
277
- $ categoryId = 333 ;
277
+ $ category = $ this ->fixtures ->get ('category ' );
278
+ $ categoryId = $ category ->getId ();
278
279
$ categoryData = [
279
280
'name ' => 'Update Category Test With default_sort_by Attribute ' ,
280
281
'is_active ' => true ,
281
282
"available_sort_by " => [],
282
283
'custom_attributes ' => [
283
284
[
284
285
'attribute_code ' => 'default_sort_by ' ,
285
- 'value ' => [ " name " ],
286
+ 'value ' => " price "
286
287
],
287
288
],
288
289
];
@@ -293,7 +294,7 @@ public function testUpdateWithDefaultSortByAttribute()
293
294
$ category = $ model ->load ($ categoryId );
294
295
$ this ->assertTrue ((bool )$ category ->getIsActive (), 'Category "is_active" must equal to true ' );
295
296
$ this ->assertEquals ("Update Category Test With default_sort_by Attribute " , $ category ->getName ());
296
- $ this ->assertEquals ("name " , $ category ->getDefaultSortBy ());
297
+ $ this ->assertEquals ("price " , $ category ->getDefaultSortBy ());
297
298
$ this ->createdCategories = [$ categoryId ];
298
299
}
299
300
You can’t perform that action at this time.
0 commit comments