summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
Diffstat (limited to '_test')
-rw-r--r--_test/cases/inc/DifferenceEngine.test.php2
-rw-r--r--_test/cases/inc/auth_admincheck.test.php1
-rw-r--r--_test/cases/inc/pageutils_getid.test.php2
-rw-r--r--_test/cases/inc/parser/parser_links.test.php15
-rw-r--r--_test/cases/inc/parser/xhtml_links.test.php2
5 files changed, 19 insertions, 3 deletions
diff --git a/_test/cases/inc/DifferenceEngine.test.php b/_test/cases/inc/DifferenceEngine.test.php
index 294f0e6e3..aa1756114 100644
--- a/_test/cases/inc/DifferenceEngine.test.php
+++ b/_test/cases/inc/DifferenceEngine.test.php
@@ -22,7 +22,7 @@ class differenceengine_test extends UnitTestCase {
');
$this->assertEqual($tdf->format($df),
'<tr><td class="diff-blockheader" colspan="2">' . $lang['line'] . ' 1:</td>
-&nbsp; &nbsp;&nbsp;<td class="diff-blockheader" colspan="2">' . $lang['line'] . ' 1:</td>
+<td class="diff-blockheader" colspan="2">' . $lang['line'] . ' 1:</td>
</tr>
<tr><td>-</td><td class="diff-deletedline">example</td><td>+</td><td class="diff-addedline">example&nbsp;<strong>example2</strong></td></tr>
');
diff --git a/_test/cases/inc/auth_admincheck.test.php b/_test/cases/inc/auth_admincheck.test.php
index a71c8801a..2a420ffd4 100644
--- a/_test/cases/inc/auth_admincheck.test.php
+++ b/_test/cases/inc/auth_admincheck.test.php
@@ -2,6 +2,7 @@
require_once DOKU_INC.'inc/init.php';
require_once DOKU_INC.'inc/auth.php';
+require_once DOKU_INC.'inc/auth/basic.class.php';
class auth_admin_test_AuthInSensitive extends auth_basic {
function isCaseSensitive(){
diff --git a/_test/cases/inc/pageutils_getid.test.php b/_test/cases/inc/pageutils_getid.test.php
index 7fccc3a60..6eddeb5ea 100644
--- a/_test/cases/inc/pageutils_getid.test.php
+++ b/_test/cases/inc/pageutils_getid.test.php
@@ -99,7 +99,7 @@ class init_getID_test extends UnitTestCase {
$_SERVER['PATH_TRANSLATED'] = '/var/www/index.html';
$_SERVER['PHP_SELF'] = '/dokuwiki/doku.php/';
- $this->assertEqual(getID(), 'start');
+ $this->assertEqual(getID(), cleanID($conf['start']));
}
}
diff --git a/_test/cases/inc/parser/parser_links.test.php b/_test/cases/inc/parser/parser_links.test.php
index a4a8c5826..53871e110 100644
--- a/_test/cases/inc/parser/parser_links.test.php
+++ b/_test/cases/inc/parser/parser_links.test.php
@@ -221,6 +221,21 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser {
$this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls);
}
+ function testInternalLinkNoChar() {
+ $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink());
+ $this->P->parse("Foo [[]] Bar");
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('cdata',array("\n".'Foo ')),
+ array('internallink',array('',NULL)),
+ array('cdata',array(' Bar')),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+ $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls);
+ }
+
function testInternalLinkNamespaceNoTitle() {
$this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink());
$this->P->parse("Foo [[foo:bar]] Bar");
diff --git a/_test/cases/inc/parser/xhtml_links.test.php b/_test/cases/inc/parser/xhtml_links.test.php
index 74c39353e..a9a6dfdbc 100644
--- a/_test/cases/inc/parser/xhtml_links.test.php
+++ b/_test/cases/inc/parser/xhtml_links.test.php
@@ -232,7 +232,7 @@ class xhtml_links_test extends UnitTestCase {
$p = new Doku_Renderer_xhtml();
$p->locallink('test', $caption);
- $expect = '<a href="#test" title="'.$caption.' &crarr;" class="wikilink1">'.$caption.'</a>';
+ $expect = '<a href="#test" title="'.$page.' &crarr;" class="wikilink1">'.$caption.'</a>';
$this->assertEqual($p->doc, $expect);
}