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:
@@ -1,45 +1,47 @@
|
||||
{
|
||||
"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.",
|
||||
"keywords": ["server", "administration", "php"],
|
||||
"homepage": "https://www.froxlor.org",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Kaufmann",
|
||||
"email": "team@froxlor.org",
|
||||
"role": "Lead Developer"
|
||||
},
|
||||
{
|
||||
"name": "Robert Förster",
|
||||
"email": "team@froxlor.org",
|
||||
"role": "Package Maintainer"
|
||||
"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.",
|
||||
"keywords" : [
|
||||
"server",
|
||||
"administration",
|
||||
"php"
|
||||
],
|
||||
"homepage" : "https://www.froxlor.org",
|
||||
"license" : "GPL-2.0-or-later",
|
||||
"authors" : [{
|
||||
"name" : "Michael Kaufmann",
|
||||
"email" : "team@froxlor.org",
|
||||
"role" : "Lead Developer"
|
||||
}, {
|
||||
"name" : "Robert Förster",
|
||||
"email" : "team@froxlor.org",
|
||||
"role" : "Package Maintainer"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"email": "team@froxlor.org",
|
||||
"issues": "https://github.com/Froxlor/Froxlor/issues",
|
||||
"forum": "https://forum.froxlor.org/",
|
||||
"wiki": "https://github.com/Froxlor/Froxlor/wiki",
|
||||
"irc": "irc://chat.freenode.net/froxlor",
|
||||
"source": "https://github.com/Froxlor/Froxlor",
|
||||
"docs": "https://github.com/Froxlor/Froxlor/wiki"
|
||||
"support" : {
|
||||
"email" : "team@froxlor.org",
|
||||
"issues" : "https://github.com/Froxlor/Froxlor/issues",
|
||||
"forum" : "https://forum.froxlor.org/",
|
||||
"wiki" : "https://github.com/Froxlor/Froxlor/wiki",
|
||||
"irc" : "irc://chat.freenode.net/froxlor",
|
||||
"source" : "https://github.com/Froxlor/Froxlor",
|
||||
"docs" : "https://github.com/Froxlor/Froxlor/wiki"
|
||||
},
|
||||
"require" : {
|
||||
"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": "*"
|
||||
"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": {
|
||||
"require-dev" : {
|
||||
"phpunit/phpunit" : "6.5.13",
|
||||
"pdepend/pdepend" : "2.5.0",
|
||||
"phpmd/phpmd" : "2.6.0",
|
||||
@@ -48,10 +50,11 @@
|
||||
"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": "*"
|
||||
"suggest" : {
|
||||
"ext-bcmath" : "*",
|
||||
"ext-zip" : "*"
|
||||
}
|
||||
}
|
||||
@@ -95,6 +95,28 @@ class CustomerBackupsTest extends TestCase
|
||||
$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()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
Reference in New Issue
Block a user