diff options
Diffstat (limited to '_test/tests/inc/remote.test.php')
-rw-r--r-- | _test/tests/inc/remote.test.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/_test/tests/inc/remote.test.php b/_test/tests/inc/remote.test.php index d0d4eb7ce..037b1dc0b 100644 --- a/_test/tests/inc/remote.test.php +++ b/_test/tests/inc/remote.test.php @@ -160,10 +160,16 @@ class remote_test extends DokuWikiTest { $this->assertTrue($this->remote->hasAccess()); } + /** + * @expectedException RemoteAccessDeniedException + */ function test_hasAccessFail() { global $conf; $conf['remote'] = 0; - $this->assertFalse($this->remote->hasAccess()); + // the hasAccess() should throw a Exception to keep the same semantics with xmlrpc.php. + // because the user(xmlrpc) check remote before .--> (!$conf['remote']) die('XML-RPC server not enabled.'); + // so it must be a Exception when get here. + $this->remote->hasAccess(); } function test_hasAccessFailAcl() { |