mirror of
https://github.com/Froxlor/Froxlor.git
synced 2024-09-21 10:27:29 +00:00
test improvements and preparation for more tests later
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
parent
1ac304e5ac
commit
028524291e
@ -9,7 +9,6 @@
|
||||
<testsuite name="froxlor">
|
||||
<!-- we need to specify the order of the tests for dependency-reasons -->
|
||||
<directory>tests/Global</directory>
|
||||
<directory>tests/Froxlor</directory>
|
||||
<directory>tests/Admins</directory>
|
||||
<directory>tests/Customers</directory>
|
||||
<directory>tests/IpsAndPorts</directory>
|
||||
@ -25,6 +24,7 @@
|
||||
<directory>tests/Mysqls</directory>
|
||||
<directory>tests/PhpAndFpm</directory>
|
||||
<directory>tests/Traffic</directory>
|
||||
<directory>tests/Froxlor</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
|
@ -5,6 +5,7 @@ use Froxlor\Settings;
|
||||
use Froxlor\Database\Database;
|
||||
use Froxlor\Api\Commands\Admins;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\SubDomains;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -58,6 +59,11 @@ class CustomersTest extends TestCase
|
||||
$this->assertEquals(1337, $result['customernumber']);
|
||||
$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']);
|
||||
}
|
||||
|
||||
public function testAdminCustomersAddEmptyMail()
|
||||
@ -447,7 +453,7 @@ class CustomersTest extends TestCase
|
||||
'mysqls' => 15,
|
||||
'createstdsubdomain' => 1,
|
||||
'new_customer_password' => 'h0lYmo1y',
|
||||
'sendpassword' => 1,
|
||||
'sendpassword' => TRAVIS_CI == 1 ? 0 : 1,
|
||||
'phpenabled' => 1,
|
||||
'store_defaultindex' => 1,
|
||||
'custom_notes' => 'secret',
|
||||
|
@ -119,7 +119,7 @@ class DomainsTest extends TestCase
|
||||
'customerid' => 1
|
||||
];
|
||||
$this->expectExceptionMessage('The server-hostname cannot be used as customer-domain.');
|
||||
$json_result = Domains::getLocal($admin_userdata, $data)->add();
|
||||
Domains::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
|
||||
public function testAdminDomainsAddNoPunycode()
|
||||
|
Loading…
Reference in New Issue
Block a user