summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authoriamchenxin <iamchenxin@gmail.com>2015-06-01 20:02:52 +0800
committerAndreas Gohr <andi@splitbrain.org>2015-07-18 13:05:14 +0200
commitb86bc28af9b961266a2caeeb86c8f6f125adc412 (patch)
treea454bc2cf791be5dde686509759b60f18e6683cf /_test
parent39f70cbdcb1c625e9fe9346132d24ec08862fca1 (diff)
downloadrpg-b86bc28af9b961266a2caeeb86c8f6f125adc412.tar.gz
rpg-b86bc28af9b961266a2caeeb86c8f6f125adc412.tar.bz2
remote.test
Diffstat (limited to '_test')
-rw-r--r--_test/tests/inc/remote.test.php8
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() {