Skip to content

Commit 2d0885e

Browse files
author
olysenko
committed
Merge branch 'MAGETWO-50026' into bugfixes
2 parents 7bdb5a7 + 81da5de commit 2d0885e

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoGetTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,10 @@ public function testCreditmemoGet()
105105
$this->assertArrayHasKey($field, $actual);
106106
$this->assertEquals($expected[$field], $actual[$field]);
107107
}
108+
109+
//check that nullable fields were marked as optional and were not sent
110+
foreach ($actual as $value) {
111+
$this->assertNotNull($value);
112+
}
108113
}
109114
}

dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/InvoiceGetTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,10 @@ public function testInvoiceGet()
4848
$this->assertArrayHasKey($field, $result);
4949
$this->assertEquals($value, $result[$field]);
5050
}
51+
52+
//check that nullable fields were marked as optional and were not sent
53+
foreach ($result as $value) {
54+
$this->assertNotNull($value);
55+
}
5156
}
5257
}

dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderGetTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,10 @@ public function testOrderGet()
8181
foreach ($expectedBillingAddressNotEmpty as $field) {
8282
$this->assertArrayHasKey($field, $result['billing_address']);
8383
}
84+
85+
//check that nullable fields were marked as optional and were not sent
86+
foreach ($result as $value) {
87+
$this->assertNotNull($value);
88+
}
8489
}
8590
}

dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderItemGetTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ public function testGet()
5353

5454
$this->assertTrue(is_array($response));
5555
$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+
}
5664
}
5765

5866
/**

0 commit comments

Comments
 (0)