public function testInvalidSubmissionFieldsMissing($field, $parent = 'attributes', $message = null)
{
$data = json_decode(json_encode($this->validSubmission));
$data->attributes->order_id = time();
if (is_null($message)) {
$this->setExpectedExceptionRegExp('opensrs\\Exception', "/{$field}.*not defined/");
} else {
$this->setExpectedExceptionRegExp('opensrs\\Exception', "/{$message}/");
}
// clear field being tested
if (is_null($parent)) {
unset($data->{$field});
} else {
unset($data->{$parent}->{$field});
}
$ns = new UpdateOrder('array', $data);
}