when not using awstats, disable awstats-related settings; add minor tweaks to unit-tests

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2020-01-10 16:44:13 +01:00
parent fc97b4d4e9
commit f21d4f8770
3 changed files with 23 additions and 12 deletions

View File

@@ -61,12 +61,17 @@ class CustomersTest extends TestCase
$this->assertEquals(15, $result['subdomains']);
$this->assertEquals('secret', $result['custom_notes']);
// validate that the std-subdomain has been added
$json_result = SubDomains::getLocal($admin_userdata, array(
'id' => $result['standardsubdomain']
))->get();
$result = json_decode($json_result, true)['data'];
$this->assertEquals('test1.dev.froxlor.org', $result['domain']);
$stdsubdomain = $result['standardsubdomain'] ?? false;
if (! $stdsubdomain) {
$this->fail('No standardsubdomain where there should be one');
} else {
// validate that the std-subdomain has been added
$json_result = SubDomains::getLocal($admin_userdata, array(
'id' => $result['standardsubdomain']
))->get();
$result = json_decode($json_result, true)['data'];
$this->assertEquals('test1.dev.froxlor.org', $result['domain']);
}
}
public function testAdminCustomersAddEmptyMail()

View File

@@ -38,6 +38,7 @@ class DomainsTest extends TestCase
$result = json_decode($json_result, true)['data'];
$this->assertEquals($customer_userdata['documentroot'] . 'test.local/', $result['documentroot']);
$this->assertTrue(in_array('TLSv1.3', explode(",", $result['ssl_protocols'])));
$this->assertEquals('0', $result['isemaildomain']);
}
/**