示例#1
0
 /**
  *  Produced by syntax like [[#test|my caption]]
  */
 function test_empty_locallink_with_caption()
 {
     $page = 'my:spacex';
     $caption = 'my caption';
     global $ID;
     $ID = $page;
     global $conf;
     $conf['basedir'] = '/';
     $conf['useheading'] = 0;
     $conf['userewrite'] = 0;
     $conf['useslash'] = 0;
     $conf['canonical'] = 0;
     $p = new Doku_Renderer_xhtml();
     $p->locallink('test', $caption);
     $expect = '<a href="#test" title="' . $page . ' &crarr;" class="wikilink1">' . $caption . '</a>';
     $this->assertEqual($p->doc, $expect);
 }