summaryrefslogtreecommitdiff
path: root/_test/tests/inc/media_ispublic.test.php
blob: 307c64654154c32e7ddf900c373fa0567dc1f12b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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'));
    }

}