fix parameter for ApiCommand::getCustomerData()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -35,7 +35,7 @@ class Ftps extends ApiCommand implements ResourceEntity
|
||||
* optional if customer.ftpatdomain is allowed, specify an username
|
||||
* @param string $ftp_domain
|
||||
* optional if customer.ftpatdomain is allowed, specify a domain (customer must be owner)
|
||||
* @param int $customer_id
|
||||
* @param int $customerid
|
||||
* required when called as admin, not needed when called as customer
|
||||
*
|
||||
* @access admin, customer
|
||||
|
||||
@@ -41,7 +41,7 @@ class SubDomains extends ApiCommand implements ResourceEntity
|
||||
* optional, whether to generate a https-redirect or not, default false; requires SSL to be enabled
|
||||
* @param bool $letsencrypt
|
||||
* optional, whether to generate a Let's Encrypt certificate for this domain, default false; requires SSL to be enabled
|
||||
* @param int $customer_id
|
||||
* @param int $customerid
|
||||
* required when called as admin, not needed when called as customer
|
||||
*
|
||||
* @access admin, customer
|
||||
|
||||
@@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers Admins
|
||||
*/
|
||||
class AdminsTest extends TestCase
|
||||
|
||||
@@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers Certificates
|
||||
*/
|
||||
class CertificatesTest extends TestCase
|
||||
|
||||
@@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers Customers
|
||||
*/
|
||||
class CustomersTest extends TestCase
|
||||
|
||||
@@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers SubDomains
|
||||
* @covers Domains
|
||||
*/
|
||||
|
||||
@@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers Emails
|
||||
*/
|
||||
class MailsTest extends TestCase
|
||||
|
||||
@@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers Ftps
|
||||
*/
|
||||
class FtpsTest extends TestCase
|
||||
@@ -170,8 +171,8 @@ class FtpsTest extends TestCase
|
||||
'sendinfomail' => 1
|
||||
];
|
||||
|
||||
$this->expectExceptionCode(404);
|
||||
$this->expectExceptionMessage('Requested parameter "customer_id" could not be found for "Ftps:add"');
|
||||
$this->expectExceptionCode(406);
|
||||
$this->expectExceptionMessage('Requested parameter "loginname" is empty where it should not be for "Customers:get"');
|
||||
$json_result = Ftps::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
|
||||
@@ -207,7 +208,7 @@ class FtpsTest extends TestCase
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
$data = [
|
||||
'username' => 'test1ftp1',
|
||||
'customer_id' => 1,
|
||||
'customerid' => 1,
|
||||
'ftp_password' => 'h4xXx0r2',
|
||||
'path' => '/anotherfolder',
|
||||
'ftp_description' => 'testing3'
|
||||
@@ -229,7 +230,7 @@ class FtpsTest extends TestCase
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
$data = [
|
||||
'customer_id' => $customer_userdata['customerid'],
|
||||
'customerid' => $customer_userdata['customerid'],
|
||||
'ftp_password' => 'h4xXx0r',
|
||||
'path' => '/',
|
||||
'ftp_description' => 'testing',
|
||||
|
||||
@@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers IpsAndPorts
|
||||
*/
|
||||
class IpsAndPortsTest extends TestCase
|
||||
|
||||
@@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers SubDomains
|
||||
* @covers Domains
|
||||
*/
|
||||
@@ -41,7 +42,7 @@ class SubDomainsTest extends TestCase
|
||||
$data = [
|
||||
'subdomain' => 'mysub2',
|
||||
'domain' => 'test2.local',
|
||||
'customer_id' => 1
|
||||
'customerid' => 1
|
||||
];
|
||||
$json_result = SubDomains::getLocal($reseller_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
@@ -161,7 +162,7 @@ class SubDomainsTest extends TestCase
|
||||
'domainname' => 'mysub.test2.local',
|
||||
'path' => 'mysub.test2.local',
|
||||
'isemaildomain' => 1,
|
||||
'customer_id' => $customer_userdata['customerid']
|
||||
'customerid' => $customer_userdata['customerid']
|
||||
];
|
||||
$json_result = SubDomains::getLocal($admin_userdata, $data)->update();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
|
||||
Reference in New Issue
Block a user