diff --git a/lib/classes/api/commands/class.Ftps.php b/lib/classes/api/commands/class.Ftps.php index 09c4f193..5fde2ed3 100644 --- a/lib/classes/api/commands/class.Ftps.php +++ b/lib/classes/api/commands/class.Ftps.php @@ -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 diff --git a/lib/classes/api/commands/class.SubDomains.php b/lib/classes/api/commands/class.SubDomains.php index 306d7ae9..c122a607 100644 --- a/lib/classes/api/commands/class.SubDomains.php +++ b/lib/classes/api/commands/class.SubDomains.php @@ -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 diff --git a/tests/Admins/AdminsTest.php b/tests/Admins/AdminsTest.php index c6a63308..79b110a2 100644 --- a/tests/Admins/AdminsTest.php +++ b/tests/Admins/AdminsTest.php @@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase; /** * @covers ApiCommand + * @covers ApiParameter * @covers Admins */ class AdminsTest extends TestCase diff --git a/tests/Certificates/CertificatesTest.php b/tests/Certificates/CertificatesTest.php index 85a307a4..b3924916 100644 --- a/tests/Certificates/CertificatesTest.php +++ b/tests/Certificates/CertificatesTest.php @@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase; /** * @covers ApiCommand + * @covers ApiParameter * @covers Certificates */ class CertificatesTest extends TestCase diff --git a/tests/Customers/CustomersTest.php b/tests/Customers/CustomersTest.php index 3d7592c6..a127178e 100644 --- a/tests/Customers/CustomersTest.php +++ b/tests/Customers/CustomersTest.php @@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase; /** * @covers ApiCommand + * @covers ApiParameter * @covers Customers */ class CustomersTest extends TestCase diff --git a/tests/Domains/DomainsTest.php b/tests/Domains/DomainsTest.php index 964b29e4..efc41901 100644 --- a/tests/Domains/DomainsTest.php +++ b/tests/Domains/DomainsTest.php @@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase; /** * @covers ApiCommand + * @covers ApiParameter * @covers SubDomains * @covers Domains */ diff --git a/tests/Emails/EmailsTest.php b/tests/Emails/EmailsTest.php index 4ba60987..77f71c12 100644 --- a/tests/Emails/EmailsTest.php +++ b/tests/Emails/EmailsTest.php @@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase; /** * @covers ApiCommand + * @covers ApiParameter * @covers Emails */ class MailsTest extends TestCase diff --git a/tests/Ftps/FtpsTest.php b/tests/Ftps/FtpsTest.php index f4dc2ed2..38389a44 100644 --- a/tests/Ftps/FtpsTest.php +++ b/tests/Ftps/FtpsTest.php @@ -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', diff --git a/tests/IpsAndPorts/IpsAndPortsTest.php b/tests/IpsAndPorts/IpsAndPortsTest.php index 94d32f27..951b22a1 100644 --- a/tests/IpsAndPorts/IpsAndPortsTest.php +++ b/tests/IpsAndPorts/IpsAndPortsTest.php @@ -3,6 +3,7 @@ use PHPUnit\Framework\TestCase; /** * @covers ApiCommand + * @covers ApiParameter * @covers IpsAndPorts */ class IpsAndPortsTest extends TestCase diff --git a/tests/SubDomains/SubDomainsTest.php b/tests/SubDomains/SubDomainsTest.php index f930ca5e..d1aa4af0 100644 --- a/tests/SubDomains/SubDomainsTest.php +++ b/tests/SubDomains/SubDomainsTest.php @@ -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'];