File tree 1 file changed +14
-1
lines changed
dev/tests/api-functional/testsuite/Magento/Sales/Service/V1
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Sales \Service \V1 ;
7
7
8
+ use Magento \Framework \Api \ExtensibleDataInterface ;
9
+ use Magento \Framework \Api \SimpleDataObjectConverter ;
8
10
use Magento \TestFramework \TestCase \WebapiAbstract ;
9
11
10
12
/**
@@ -57,7 +59,18 @@ public function testShipmentGet()
57
59
unset($ data ['tracks ' ]);
58
60
foreach ($ data as $ key => $ value ) {
59
61
if (!empty ($ value )) {
60
- $ this ->assertEquals ($ shipment ->getData ($ key ), $ value , $ key );
62
+ if ($ key === ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ) {
63
+ foreach ($ value as $ extensionAttributeKey => $ extensionAttributeValue ) {
64
+ $ methodName = 'get ' .
65
+ SimpleDataObjectConverter::snakeCaseToUpperCamelCase ($ extensionAttributeKey );
66
+ $ this ->assertEquals (
67
+ $ shipment ->getExtensionAttributes ()->$ methodName (),
68
+ $ extensionAttributeValue
69
+ );
70
+ }
71
+ } else {
72
+ $ this ->assertEquals ($ shipment ->getData ($ key ), $ value , $ key );
73
+ }
61
74
}
62
75
}
63
76
$ shipmentItem = $ this ->objectManager ->get (\Magento \Sales \Model \Order \Shipment \Item::class);
You can’t perform that action at this time.
0 commit comments