From 188eedde2362cd12846432198ac6e13f313664c9 Mon Sep 17 00:00:00 2001 From: Martijn Ras Date: Fri, 13 Feb 2015 20:23:54 +0100 Subject: [PATCH] Updated test --- _test/tests/inc/remote.test.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/_test/tests/inc/remote.test.php b/_test/tests/inc/remote.test.php index d0d4eb7ce0..b34eacf88f 100644 --- a/_test/tests/inc/remote.test.php +++ b/_test/tests/inc/remote.test.php @@ -157,6 +157,8 @@ function test_pluginMethods() { } function test_hasAccessSuccess() { + global $conf; + $conf['remoteuser'] = ''; $this->assertTrue($this->remote->hasAccess()); } @@ -203,6 +205,7 @@ function test_hasAccessFailAcl2() { function test_forceAccessSuccess() { global $conf; $conf['remote'] = 1; + $conf['remoteuser'] = ''; $this->remote->forceAccess(); // no exception should occur } @@ -217,7 +220,11 @@ function test_forceAccessFail() { function test_generalCoreFunctionWithoutArguments() { global $conf; + global $USERINFO; $conf['remote'] = 1; + $conf['remoteuser'] = ''; + $conf['useacl'] = 1; + $USERINFO['grps'] = array('grp'); $remoteApi = new RemoteApi(); $remoteApi->getCoreMethods(new RemoteAPICoreTest()); @@ -243,7 +250,10 @@ function test_generalCoreFunctionOnArgumentMismatch() { function test_generalCoreFunctionWithArguments() { global $conf; + global $USERINFO; $conf['remote'] = 1; + $conf['remoteuser'] = ''; + $conf['useacl'] = 1; $remoteApi = new RemoteApi(); $remoteApi->getCoreMethods(new RemoteAPICoreTest()); @@ -256,7 +266,10 @@ function test_generalCoreFunctionWithArguments() { function test_pluginCallMethods() { global $conf; + global $USERINFO; $conf['remote'] = 1; + $conf['remoteuser'] = ''; + $conf['useacl'] = 1; $remoteApi = new RemoteApi(); $this->assertEquals($remoteApi->call('plugin.testplugin.method1'), null); @@ -313,6 +326,11 @@ function test_publicCallPluginDeny() { } function test_pluginCallCustomPath() { + global $conf; + global $USERINFO; + $conf['remote'] = 1; + $conf['remoteuser'] = ''; + $conf['useacl'] = 1; global $EVENT_HANDLER; $EVENT_HANDLER->register_hook('RPC_CALL_ADD', 'BEFORE', $this, 'pluginCallCustomPathRegister');