Skip to content
Snippets Groups Projects
Commit 2d0885e4 authored by olysenko's avatar olysenko
Browse files

Merge branch 'MAGETWO-50026' into bugfixes

parents 7bdb5a72 81da5de9
Branches
No related merge requests found
...@@ -105,5 +105,10 @@ class CreditmemoGetTest extends WebapiAbstract ...@@ -105,5 +105,10 @@ class CreditmemoGetTest extends WebapiAbstract
$this->assertArrayHasKey($field, $actual); $this->assertArrayHasKey($field, $actual);
$this->assertEquals($expected[$field], $actual[$field]); $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);
}
} }
} }
...@@ -48,5 +48,10 @@ class InvoiceGetTest extends WebapiAbstract ...@@ -48,5 +48,10 @@ class InvoiceGetTest extends WebapiAbstract
$this->assertArrayHasKey($field, $result); $this->assertArrayHasKey($field, $result);
$this->assertEquals($value, $result[$field]); $this->assertEquals($value, $result[$field]);
} }
//check that nullable fields were marked as optional and were not sent
foreach ($result as $value) {
$this->assertNotNull($value);
}
} }
} }
...@@ -81,5 +81,10 @@ class OrderGetTest extends WebapiAbstract ...@@ -81,5 +81,10 @@ class OrderGetTest extends WebapiAbstract
foreach ($expectedBillingAddressNotEmpty as $field) { foreach ($expectedBillingAddressNotEmpty as $field) {
$this->assertArrayHasKey($field, $result['billing_address']); $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);
}
} }
} }
...@@ -53,6 +53,14 @@ class OrderItemGetTest extends WebapiAbstract ...@@ -53,6 +53,14 @@ class OrderItemGetTest extends WebapiAbstract
$this->assertTrue(is_array($response)); $this->assertTrue(is_array($response));
$this->assertOrderItem($orderItem, $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);
}
} }
/** /**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment