summaryrefslogtreecommitdiff
path: root/_test/tests/inc
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-03-03 11:06:40 -0800
committerAndreas Gohr <andi@splitbrain.org>2013-03-03 11:06:40 -0800
commite652d10490464a2f15e485202c6a7f5a536e62e6 (patch)
tree9ebdc264e20514a58c56163a0475eb2336ff68a2 /_test/tests/inc
parent6535e29c55fe997fa55a4f755bff8a41fbd9d525 (diff)
parent1b8b28faf419d50137b455d4d9a39cfd0fff3f4c (diff)
downloadrpg-e652d10490464a2f15e485202c6a7f5a536e62e6.tar.gz
rpg-e652d10490464a2f15e485202c6a7f5a536e62e6.tar.bz2
Merge pull request #193 from splitbrain/altcachesecurity
alternative fix for FS#2734
Diffstat (limited to '_test/tests/inc')
-rw-r--r--_test/tests/inc/media_ispublic.test.php18
1 files changed, 18 insertions, 0 deletions
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