diff options
author | Izidor Matušov <izidor.matusov@gmail.com> | 2011-04-07 11:44:16 +0200 |
---|---|---|
committer | Michael Hamann <michael@content-space.de> | 2011-04-07 18:00:12 +0200 |
commit | 38574c3529746542183c68d28c6ad6fc1de2d6dd (patch) | |
tree | 96ab79c946a0a4b7cd8e6b734a534ab76ed2c484 /_test/cases/inc/parser/xhtml_links.test.php | |
parent | 4ab823396c3a43defae8363fec0e0eceb90720e6 (diff) | |
download | rpg-38574c3529746542183c68d28c6ad6fc1de2d6dd.tar.gz rpg-38574c3529746542183c68d28c6ad6fc1de2d6dd.tar.bz2 |
Added configuration variables for empty link testcases and added testcases for resolve_pageid
Diffstat (limited to '_test/cases/inc/parser/xhtml_links.test.php')
-rw-r--r-- | _test/cases/inc/parser/xhtml_links.test.php | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/_test/cases/inc/parser/xhtml_links.test.php b/_test/cases/inc/parser/xhtml_links.test.php index 4954086a2..11883dd9c 100644 --- a/_test/cases/inc/parser/xhtml_links.test.php +++ b/_test/cases/inc/parser/xhtml_links.test.php @@ -48,10 +48,17 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->internallink(''); - $expect = '<span class="curid"><a href="/./doku.php/my:space" class="wikilink1" title="my:space">start</a></span>'; + $expect = '<span class="curid"><a href="/./doku.php?id=my:space" class="wikilink1" title="my:space">start</a></span>'; $this->assertEqual($p->doc, $expect); } @@ -63,10 +70,17 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->internallink('', 'my caption'); - $expect = '<span class="curid"><a href="/./doku.php/my:space" class="wikilink1" title="my:space">my caption</a></span>'; + $expect = '<span class="curid"><a href="/./doku.php?id=my:space" class="wikilink1" title="my:space">my caption</a></span>'; $this->assertEqual($p->doc, $expect); } @@ -78,10 +92,17 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->internallink('?do=index'); - $expect = '<span class="curid"><a href="/./doku.php/my:space?do=index" class="wikilink1" title="my:space">start</a></span>'; + $expect = '<span class="curid"><a href="/./doku.php?id=my:space&do=index" class="wikilink1" title="my:space">start</a></span>'; $this->assertEqual($p->doc, $expect); } @@ -93,10 +114,17 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->internallink('?do=index', 'my caption'); - $expect = '<span class="curid"><a href="/./doku.php/my:space?do=index" class="wikilink1" title="my:space">my caption</a></span>'; + $expect = '<span class="curid"><a href="/./doku.php?id=my:space&do=index" class="wikilink1" title="my:space">my caption</a></span>'; $this->assertEqual($p->doc, $expect); } @@ -108,6 +136,13 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->locallink('test'); @@ -123,6 +158,13 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->locallink('test', 'my caption'); |