File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
dev/tests/api-functional/testsuite/Magento/Catalog/Api Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -713,16 +713,16 @@ public function testGetList()
713
713
714
714
$ this ->assertNotNull ($ response ['items ' ][0 ]['sku ' ]);
715
715
$ this ->assertEquals ('simple ' , $ response ['items ' ][0 ]['sku ' ]);
716
- $ isCategoryInformationExist = false ;
716
+
717
717
$ index = null ;
718
- foreach ($ response ['items ' ][0 ]['custom_attributes ' ] as $ key => $ customAttribute ) {
718
+ foreach ($ response ['items ' ][0 ]['custom_attributes ' ] as $ key => $ customAttribute ) {
719
719
if ($ customAttribute ['attribute_code ' ] == 'category_ids ' ) {
720
- $ isCategoryInformationExist = true ;
721
720
$ index = $ key ;
721
+ break ;
722
722
}
723
723
}
724
- $ this ->assertTrue ( $ isCategoryInformationExist , 'Category information wasn \'t set ' );
725
- $ this ->assertEquals ([2 ], $ response ['items ' ][0 ]['custom_attributes ' ][$ index ]['value ' ]);
724
+ $ this ->assertNotNull ( $ index , 'Category information wasn \'t set ' );
725
+ $ this ->assertEquals ([' 2 ' ], $ response ['items ' ][0 ]['custom_attributes ' ][$ index ]['value ' ]);
726
726
}
727
727
728
728
/**
You can’t perform that action at this time.
0 commit comments