File tree Expand file tree Collapse file tree 4 files changed +23
-0
lines changed
dev/tests/api-functional/testsuite/Magento/Sales/Service/V1 Expand file tree Collapse file tree 4 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -105,5 +105,10 @@ public function testCreditmemoGet()
105
105
$ this ->assertArrayHasKey ($ field , $ actual );
106
106
$ this ->assertEquals ($ expected [$ field ], $ actual [$ field ]);
107
107
}
108
+
109
+ //check that nullable fields were marked as optional and were not sent
110
+ foreach ($ actual as $ value ) {
111
+ $ this ->assertNotNull ($ value );
112
+ }
108
113
}
109
114
}
Original file line number Diff line number Diff line change @@ -48,5 +48,10 @@ public function testInvoiceGet()
48
48
$ this ->assertArrayHasKey ($ field , $ result );
49
49
$ this ->assertEquals ($ value , $ result [$ field ]);
50
50
}
51
+
52
+ //check that nullable fields were marked as optional and were not sent
53
+ foreach ($ result as $ value ) {
54
+ $ this ->assertNotNull ($ value );
55
+ }
51
56
}
52
57
}
Original file line number Diff line number Diff line change @@ -81,5 +81,10 @@ public function testOrderGet()
81
81
foreach ($ expectedBillingAddressNotEmpty as $ field ) {
82
82
$ this ->assertArrayHasKey ($ field , $ result ['billing_address ' ]);
83
83
}
84
+
85
+ //check that nullable fields were marked as optional and were not sent
86
+ foreach ($ result as $ value ) {
87
+ $ this ->assertNotNull ($ value );
88
+ }
84
89
}
85
90
}
Original file line number Diff line number Diff line change @@ -53,6 +53,14 @@ public function testGet()
53
53
54
54
$ this ->assertTrue (is_array ($ response ));
55
55
$ this ->assertOrderItem ($ orderItem , $ response );
56
+
57
+ //check that nullable fields were marked as optional and were not sent
58
+ foreach ($ response as $ fieldName => $ value ) {
59
+ if ($ fieldName == 'sku ' ) {
60
+ continue ;
61
+ }
62
+ $ this ->assertNotNull ($ value );
63
+ }
56
64
}
57
65
58
66
/**
You can’t perform that action at this time.
0 commit comments