format composer.json and add php-7.0 as dev-requirement (phpunit6); add unit-test for Backup.add() when customer passes / as path value
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
113
composer.json
113
composer.json
@@ -1,57 +1,60 @@
|
|||||||
{
|
{
|
||||||
"name": "froxlor/froxlor",
|
"name" : "froxlor/froxlor",
|
||||||
"description": "The server administration software for your needs. Developed by experienced server administrators, this panel simplifies the effort of managing your hosting platform.",
|
"description" : "The server administration software for your needs. Developed by experienced server administrators, this panel simplifies the effort of managing your hosting platform.",
|
||||||
"keywords": ["server", "administration", "php"],
|
"keywords" : [
|
||||||
"homepage": "https://www.froxlor.org",
|
"server",
|
||||||
"license": "GPL-2.0-or-later",
|
"administration",
|
||||||
"authors": [
|
"php"
|
||||||
{
|
],
|
||||||
"name": "Michael Kaufmann",
|
"homepage" : "https://www.froxlor.org",
|
||||||
"email": "team@froxlor.org",
|
"license" : "GPL-2.0-or-later",
|
||||||
"role": "Lead Developer"
|
"authors" : [{
|
||||||
},
|
"name" : "Michael Kaufmann",
|
||||||
{
|
"email" : "team@froxlor.org",
|
||||||
"name": "Robert Förster",
|
"role" : "Lead Developer"
|
||||||
"email": "team@froxlor.org",
|
}, {
|
||||||
"role": "Package Maintainer"
|
"name" : "Robert Förster",
|
||||||
}
|
"email" : "team@froxlor.org",
|
||||||
],
|
"role" : "Package Maintainer"
|
||||||
"support": {
|
}
|
||||||
"email": "team@froxlor.org",
|
],
|
||||||
"issues": "https://github.com/Froxlor/Froxlor/issues",
|
"support" : {
|
||||||
"forum": "https://forum.froxlor.org/",
|
"email" : "team@froxlor.org",
|
||||||
"wiki": "https://github.com/Froxlor/Froxlor/wiki",
|
"issues" : "https://github.com/Froxlor/Froxlor/issues",
|
||||||
"irc": "irc://chat.freenode.net/froxlor",
|
"forum" : "https://forum.froxlor.org/",
|
||||||
"source": "https://github.com/Froxlor/Froxlor",
|
"wiki" : "https://github.com/Froxlor/Froxlor/wiki",
|
||||||
"docs": "https://github.com/Froxlor/Froxlor/wiki"
|
"irc" : "irc://chat.freenode.net/froxlor",
|
||||||
},
|
"source" : "https://github.com/Froxlor/Froxlor",
|
||||||
"require" : {
|
"docs" : "https://github.com/Froxlor/Froxlor/wiki"
|
||||||
"php" : ">=5.3",
|
|
||||||
"ext-session": "*",
|
|
||||||
"ext-ctype": "*",
|
|
||||||
"ext-pdo": "*",
|
|
||||||
"ext-pdo_mysql": "*",
|
|
||||||
"ext-simplexml": "*",
|
|
||||||
"ext-xml": "*",
|
|
||||||
"ext-filter": "*",
|
|
||||||
"ext-posix": "*",
|
|
||||||
"ext-mbstring": "*",
|
|
||||||
"ext-curl": "*",
|
|
||||||
"ext-json": "*"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit" : "6.5.13",
|
|
||||||
"pdepend/pdepend" : "2.5.0",
|
|
||||||
"phpmd/phpmd" : "2.6.0",
|
|
||||||
"sebastian/phpcpd" : "3.0.1",
|
|
||||||
"squizlabs/php_codesniffer" : "3.3.2",
|
|
||||||
"phploc/phploc" : "3.0.1",
|
|
||||||
"theseer/phpdox" : "0.11.2",
|
|
||||||
"phpunit/php-invoker" : "1.1.4",
|
|
||||||
"ext-pcntl" : "*"
|
|
||||||
},
|
},
|
||||||
"suggest": {
|
"require" : {
|
||||||
"ext-bcmath": "*",
|
"php" : ">=5.3",
|
||||||
"ext-zip": "*"
|
"ext-session" : "*",
|
||||||
}
|
"ext-ctype" : "*",
|
||||||
}
|
"ext-pdo" : "*",
|
||||||
|
"ext-pdo_mysql" : "*",
|
||||||
|
"ext-simplexml" : "*",
|
||||||
|
"ext-xml" : "*",
|
||||||
|
"ext-filter" : "*",
|
||||||
|
"ext-posix" : "*",
|
||||||
|
"ext-mbstring" : "*",
|
||||||
|
"ext-curl" : "*",
|
||||||
|
"ext-json" : "*"
|
||||||
|
},
|
||||||
|
"require-dev" : {
|
||||||
|
"phpunit/phpunit" : "6.5.13",
|
||||||
|
"pdepend/pdepend" : "2.5.0",
|
||||||
|
"phpmd/phpmd" : "2.6.0",
|
||||||
|
"sebastian/phpcpd" : "3.0.1",
|
||||||
|
"squizlabs/php_codesniffer" : "3.3.2",
|
||||||
|
"phploc/phploc" : "3.0.1",
|
||||||
|
"theseer/phpdox" : "0.11.2",
|
||||||
|
"phpunit/php-invoker" : "1.1.4",
|
||||||
|
"php" : ">=7.0",
|
||||||
|
"ext-pcntl" : "*"
|
||||||
|
},
|
||||||
|
"suggest" : {
|
||||||
|
"ext-bcmath" : "*",
|
||||||
|
"ext-zip" : "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -95,6 +95,28 @@ class CustomerBackupsTest extends TestCase
|
|||||||
$this->assertEquals('0', $result['backup_web']);
|
$this->assertEquals('0', $result['backup_web']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @depends testCustomerCustomerBackupsAdd
|
||||||
|
*/
|
||||||
|
public function testCustomerCustomerBackupsAddPathNotDocroot()
|
||||||
|
{
|
||||||
|
global $admin_userdata;
|
||||||
|
|
||||||
|
// get customer
|
||||||
|
$json_result = Customers::getLocal($admin_userdata, array(
|
||||||
|
'loginname' => 'test1'
|
||||||
|
))->get();
|
||||||
|
$customer_userdata = json_decode($json_result, true)['data'];
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'path' => '/'
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->expectExceptionCode(400);
|
||||||
|
$this->expectExceptionMessage('The folder for backups cannot be your homedir, please chose a folder within your homedir, e.g. /backups');
|
||||||
|
$json_result = CustomerBackups::getLocal($customer_userdata, $data)->add();
|
||||||
|
}
|
||||||
|
|
||||||
public function testAdminCustomerBackupsGet()
|
public function testAdminCustomerBackupsGet()
|
||||||
{
|
{
|
||||||
global $admin_userdata;
|
global $admin_userdata;
|
||||||
|
|||||||
Reference in New Issue
Block a user