public function testInvalidSubmissionFieldsMissing($field, $parent = 'data', $message = null)
{
$data = json_decode(json_encode($this->validSubmission));
$data->data->domain = 'phptest' . time() . '.com';
$data->data->selected = '.com,.net';
$data->data->alldomains = '.com,.net,.org';
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 FastDomainLookup('array', $data);
}