diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoGetTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoGetTest.php index e5a452df8c0ac289ec5bb1193afb1025cc7e98b3..b567d9a5110952adeac8ae66331d8c210cfb4480 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoGetTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoGetTest.php @@ -105,5 +105,10 @@ class CreditmemoGetTest extends WebapiAbstract $this->assertArrayHasKey($field, $actual); $this->assertEquals($expected[$field], $actual[$field]); } + + //check that nullable fields were marked as optional and were not sent + foreach ($actual as $value) { + $this->assertNotNull($value); + } } } diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/InvoiceGetTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/InvoiceGetTest.php index 912f222a8e8f28ac34859cfaf722f9dff78b264e..030ed01fd1a77c03612c8e8453e2c1622f92d7d1 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/InvoiceGetTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/InvoiceGetTest.php @@ -48,5 +48,10 @@ class InvoiceGetTest extends WebapiAbstract $this->assertArrayHasKey($field, $result); $this->assertEquals($value, $result[$field]); } + + //check that nullable fields were marked as optional and were not sent + foreach ($result as $value) { + $this->assertNotNull($value); + } } } diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderGetTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderGetTest.php index f71b6cbec323dde7df02b777b44397ad1a314cb4..4526e48fdacfcbbaaa56955d4c9cd88b294b70d1 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderGetTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderGetTest.php @@ -81,5 +81,10 @@ class OrderGetTest extends WebapiAbstract foreach ($expectedBillingAddressNotEmpty as $field) { $this->assertArrayHasKey($field, $result['billing_address']); } + + //check that nullable fields were marked as optional and were not sent + foreach ($result as $value) { + $this->assertNotNull($value); + } } } diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderItemGetTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderItemGetTest.php index 88a94ca32fc50ed7969d99c2db75295e6a4c0d0d..7831c10ff3ae58b2701ad43642f608ded92be8be 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderItemGetTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderItemGetTest.php @@ -53,6 +53,14 @@ class OrderItemGetTest extends WebapiAbstract $this->assertTrue(is_array($response)); $this->assertOrderItem($orderItem, $response); + + //check that nullable fields were marked as optional and were not sent + foreach ($response as $fieldName => $value) { + if ($fieldName == 'sku') { + continue; + } + $this->assertNotNull($value); + } } /**