more DomainZones unit-tests

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2018-03-23 13:35:50 +01:00
parent 48d7110779
commit c149cbacf7
2 changed files with 413 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ class DomainZones extends ApiCommand implements ResourceEntity
if ($result['parentdomainid'] != '0') {
throw new Exception("DNS zones can only be generated for the main domain, not for subdomains", 406);
}
if ($result['subisbinddomain'] != '1') {
standard_error('dns_domain_nodns', '', true);
}
@@ -206,10 +206,10 @@ class DomainZones extends ApiCommand implements ResourceEntity
$new_entry = array(
'record' => $record,
'type' => $type,
'prio' => $prio,
'prio' => (int) $prio,
'content' => $content,
'ttl' => $ttl,
'domain_id' => $id
'ttl' => (int) $ttl,
'domain_id' => (int) $id
);
ksort($new_entry);
@@ -297,7 +297,7 @@ class DomainZones extends ApiCommand implements ResourceEntity
if ($result['parentdomainid'] != '0') {
throw new Exception("DNS zones can only be generated for the main domain, not for subdomains", 406);
}
if ($result['subisbinddomain'] != '1') {
standard_error('dns_domain_nodns', '', true);
}