diff --git a/composer.json b/composer.json index d2a2f0c6..2d88f405 100644 --- a/composer.json +++ b/composer.json @@ -1,57 +1,60 @@ { - "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" - }, - "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": "*" - }, - "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" : "*" + "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" }, - "suggest": { - "ext-bcmath": "*", - "ext-zip": "*" - } -} + "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" : "*" + }, + "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" : "*" + } +} \ No newline at end of file diff --git a/tests/Backup/CustomerBackupsTest.php b/tests/Backup/CustomerBackupsTest.php index 6a865780..4c0a6e77 100644 --- a/tests/Backup/CustomerBackupsTest.php +++ b/tests/Backup/CustomerBackupsTest.php @@ -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;