1*add8678fSAndreas Gohr<?php 2*add8678fSAndreas Gohr 3*add8678fSAndreas Gohrclass media_ispublic_test extends DokuWikiTest { 4*add8678fSAndreas Gohr 5*add8678fSAndreas Gohr 6*add8678fSAndreas Gohr public function test_external(){ 7*add8678fSAndreas Gohr $this->assertTrue(media_ispublic('http://www.example.com/foo.png')); 8*add8678fSAndreas Gohr $this->assertTrue(media_ispublic('https://www.example.com/foo.png')); 9*add8678fSAndreas Gohr $this->assertTrue(media_ispublic('hTTp://www.example.com/foo.png')); 10*add8678fSAndreas Gohr $this->assertTrue(media_ispublic('hTTps://www.example.com/foo.png')); 11*add8678fSAndreas Gohr } 12*add8678fSAndreas Gohr 13*add8678fSAndreas Gohr public function test_internal(){ 14*add8678fSAndreas Gohr $this->assertTrue(media_ispublic('wiki:logo.png')); 15*add8678fSAndreas Gohr $this->assertFalse(media_ispublic('private:logo.png')); 16*add8678fSAndreas Gohr } 17*add8678fSAndreas Gohr 18*add8678fSAndreas Gohr}