[ Index ] |
PHP Cross Reference of DokuWiki |
[Summary view] [Print] [Text view]
1 <?php 2 3 class common_basicinfo_test extends DokuWikiTest { 4 5 function setup() : void { 6 parent::setup(); 7 8 global $USERINFO; 9 $USERINFO = array( 10 'pass' => '179ad45c6ce2cb97cf1029e212046e81', 11 'name' => 'Arthur Dent', 12 'mail' => 'arthur@example.com', 13 'grps' => array ('admin','user'), 14 ); 15 $_SERVER['REMOTE_USER'] = 'testuser'; 16 $_SERVER['REMOTE_ADDR'] = '1.2.3.4'; 17 } 18 19 function _get_info() { 20 global $USERINFO; 21 $info = array ( 22 'isadmin' => true, 23 'ismanager' => true, 24 'userinfo' => $USERINFO, 25 'perm' => 255, 26 'namespace' => false, 27 'ismobile' => false, 28 'client' => 'testuser', 29 ); 30 31 return $info; 32 } 33 34 /** 35 * We're interested in the extra keys for $INFO when its a media request 36 */ 37 function test_mediainfo(){ 38 global $NS, $IMG; 39 $NS = ''; 40 $IMG = 'testimage.png'; 41 42 $info = $this->_get_info(); 43 $info['image'] = 'testimage.png'; 44 45 $this->assertEquals(mediainfo(),$info); 46 } 47 } 48 49 //Setup VIM: ex: et ts=4 :
title
Description
Body
title
Description
Body
title
Description
Body
title
Body