summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-03-01 12:54:01 +0100
committerAndreas Gohr <andi@splitbrain.org>2013-03-01 12:54:01 +0100
commitadd8678f233ad74892a96444e3013e0465616200 (patch)
tree10af2fae55051b7ed710e64d462497d0f4161432 /_test
parent058fd09655df42c72f3c447e3b9561e4909e978d (diff)
downloadrpg-add8678f233ad74892a96444e3013e0465616200.tar.gz
rpg-add8678f233ad74892a96444e3013e0465616200.tar.bz2
alternative fix for FS#2734
Diffstat (limited to '_test')
-rw-r--r--_test/conf/acl.auth.php1
-rw-r--r--_test/tests/inc/media_ispublic.test.php18
2 files changed, 19 insertions, 0 deletions
diff --git a/_test/conf/acl.auth.php b/_test/conf/acl.auth.php
index 8a1b01f23..495740720 100644
--- a/_test/conf/acl.auth.php
+++ b/_test/conf/acl.auth.php
@@ -19,6 +19,7 @@
# delete 16
* @ALL 8
+private:* @ALL 0
# for testing wildcards:
users:* @ALL 1
diff --git a/_test/tests/inc/media_ispublic.test.php b/_test/tests/inc/media_ispublic.test.php
new file mode 100644
index 000000000..307c64654
--- /dev/null
+++ b/_test/tests/inc/media_ispublic.test.php
@@ -0,0 +1,18 @@
+<?php
+
+class media_ispublic_test extends DokuWikiTest {
+
+
+ public function test_external(){
+ $this->assertTrue(media_ispublic('http://www.example.com/foo.png'));
+ $this->assertTrue(media_ispublic('https://www.example.com/foo.png'));
+ $this->assertTrue(media_ispublic('hTTp://www.example.com/foo.png'));
+ $this->assertTrue(media_ispublic('hTTps://www.example.com/foo.png'));
+ }
+
+ public function test_internal(){
+ $this->assertTrue(media_ispublic('wiki:logo.png'));
+ $this->assertFalse(media_ispublic('private:logo.png'));
+ }
+
+} \ No newline at end of file