add some more unit-tests for Cronjobs and PhpSettings

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-10-28 13:47:19 +01:00
parent ce2722d429
commit e16ea186dc
2 changed files with 68 additions and 1 deletions

View File

@@ -17,7 +17,20 @@ class CronjobsTest extends TestCase
$this->assertTrue(isset($result['list'][0]['module']));
$this->assertTrue(isset($result['list'][0]['cronfile']));
}
public function testCustomerCronjobsListNotAllowed()
{
global $admin_userdata;
// get customer
$json_result = Customers::getLocal($admin_userdata, array(
'loginname' => 'test1'
))->get();
$customer_userdata = json_decode($json_result, true)['data'];
$this->expectExceptionCode(403);
$this->expectExceptionMessage("Not allowed to execute given command.");
Cronjobs::getLocal($customer_userdata)->listing();
}
public function testAdminCronjobsAdd()
{
global $admin_userdata;