diff options
author | chris <chris@jalakai.co.uk> | 2006-11-04 15:26:39 +0100 |
---|---|---|
committer | chris <chris@jalakai.co.uk> | 2006-11-04 15:26:39 +0100 |
commit | 34abd7fead48649d11916b9eba4bbe31eff83917 (patch) | |
tree | 450e021546c9f3127168b9ebb30dab0efcd0b238 | |
parent | 54f0e6ea83591f920ac7b4719213e38f317740ed (diff) | |
download | rpg-34abd7fead48649d11916b9eba4bbe31eff83917.tar.gz rpg-34abd7fead48649d11916b9eba4bbe31eff83917.tar.bz2 |
fix xhtml_links test case
darcs-hash:20061104142639-9b6ab-af9413b6e751b13bb358fc3a8b307d9cd493e1fa.gz
-rw-r--r-- | _test/cases/inc/parser/xhtml_links.test.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/_test/cases/inc/parser/xhtml_links.test.php b/_test/cases/inc/parser/xhtml_links.test.php index 6582d33d8..42ffb020e 100644 --- a/_test/cases/inc/parser/xhtml_links.test.php +++ b/_test/cases/inc/parser/xhtml_links.test.php @@ -1,4 +1,5 @@ <?php +if (!defined('DOKU_BASE')) define('DOKU_BASE','./'); require_once DOKU_INC.'inc/parser/xhtml.php'; class xhtml_links_test extends UnitTestCase { @@ -6,6 +7,7 @@ class xhtml_links_test extends UnitTestCase { function test_emaillink(){ global $conf; $conf['mailguard'] = 'visible'; + $conf['userewrite'] = 0; $p = new Doku_Renderer_xhtml(); $p->emaillink('foo@example.com','<script>alert(\'"alert"\');</script>'); @@ -18,6 +20,7 @@ class xhtml_links_test extends UnitTestCase { function test_emaillink_with_media(){ global $conf; $conf['mailguard'] = 'visible'; + $conf['userewrite'] = 2; $image = array( 'type'=>'internalmedia', @@ -33,7 +36,7 @@ class xhtml_links_test extends UnitTestCase { $p = new Doku_Renderer_xhtml(); $p->emaillink('foo@example.com',$image); - $expect = '<a href="mailto:foo%20%5Bat%5D%20example%20%5Bdot%5D%20com" class="media JSnocheck" title="foo [at] example [dot] com"><img src="./lib/exe/fetch.php/img.gif?w=10&h=20&cache=nocache" class="media" title="Some Image" alt="Some Image" width="10" height="20" /></a>'; + $expect = '<a href="mailto:foo%20%5Bat%5D%20example%20%5Bdot%5D%20com" class="media JSnocheck" title="foo [at] example [dot] com"><img src="'.DOKU_BASE.'lib/exe/fetch.php/img.gif?w=10&h=20&cache=nocache" class="media" title="Some Image" alt="Some Image" width="10" height="20" /></a>'; $this->assertEqual($p->doc,$expect); } |