diff --git a/_test/README b/_test/README index d651a4a82b3245f990ef1abc45e18703fbfc9f38..099290a0dbea6058b95c85c1ab3e571a46a8d93a 100644 --- a/_test/README +++ b/_test/README @@ -53,7 +53,7 @@ You can run the tests in three ways. From the command line: Using a web browser; - http://localhost/dokuwiki/test/index.php + http://localhost/dokuwiki/_test/index.php As remote tests run on a remote serveri (specified in tests.ini with REMOTE_TEST_URL) and driven locally from the command line using; diff --git a/_test/cases/inc/form_form.test.php b/_test/cases/inc/form_form.test.php index 0c59d4a85e242d3ff3466e9899d489dea85ec143..7a5913bf89e6d6490262f119f2c61c57335c8d68 100644 --- a/_test/cases/inc/form_form.test.php +++ b/_test/cases/inc/form_form.test.php @@ -21,19 +21,20 @@ class form_test extends UnitTestCase { $realoutput = '<form action="/test" method="post" '; $realoutput .= 'accept-charset="'.$lang['encoding'].'" id="dw__testform">'; $realoutput .= "\n"; - $realoutput .= '<div class="no"><input type="hidden" name="summary" value="changes &c" /></div>'; + $realoutput .= '<div class="no"><input type="hidden" name="sectok" value="'.getSecurityToken().'" />'; + $realoutput .= '<input type="hidden" name="summary" value="changes &c" /></div>'; $realoutput .= "\n"; $realoutput .= "<fieldset ><legend>Test</legend>\n"; $realoutput .= '<label class="block" for="text__id"><span>Text</span> '; - $realoutput .= '<input type="text" class="edit" id="text__id" name="t" value="v" /></label><br />'; + $realoutput .= '<input type="text" id="text__id" name="t" value="v" class="edit" /></label><br />'; $realoutput .= "\n"; $realoutput .= '<label class="simple" for="check__id">'; $realoutput .= '<input type="checkbox" id="check__id" name="r" value="1" /> '; $realoutput .= '<span>Check</span></label>'; $realoutput .= "\n"; - $realoutput .= '<input class="button" name="do[save]" type="submit" value="Save" accesskey="s" title="Save [ALT+S]" />'; + $realoutput .= '<input name="do[save]" type="submit" value="Save" class="button" accesskey="s" title="Save [ALT+S]" />'; $realoutput .= "\n"; - $realoutput .= '<input class="button" name="do[cancel]" type="submit" value="Cancel" />'; + $realoutput .= '<input name="do[cancel]" type="submit" value="Cancel" class="button" />'; $realoutput .= "\n"; $realoutput .= "</fieldset>\n</form>\n"; return $realoutput; @@ -45,6 +46,7 @@ class form_test extends UnitTestCase { $form->printForm(); $output = ob_get_contents(); ob_end_clean(); + $form->addHidden('sectok', getSecurityToken()); $this->assertEqual($output,$this->_realoutput()); } @@ -56,7 +58,8 @@ class form_test extends UnitTestCase { '_class'=>'block', 'id'=>'text__id', 'name'=>'t', - 'value'=>'v')); + 'value'=>'v', + 'class'=>'edit')); $e2 =& $form->getElementAt(99); $this->assertEqual($e2, array('_elem'=>'closefieldset')); } diff --git a/_test/cases/inc/pageutils_resolve_pageid.test.php b/_test/cases/inc/pageutils_resolve_pageid.test.php index ab282b57addc8ece56c5100d260c754cb779c666..738a7d2aa9853f5f41189f00b219d981181f7fb1 100644 --- a/_test/cases/inc/pageutils_resolve_pageid.test.php +++ b/_test/cases/inc/pageutils_resolve_pageid.test.php @@ -48,7 +48,7 @@ class init_resolve_pageid_test extends UnitTestCase { $tests[] = array('foo','.:','foo:start'); $tests[] = array('','foo:','foo:start'); $tests[] = array('foo','foo:','foo:start'); - $tests[] = array('foo','playground:','playground:playground'); + $tests[] = array('foo','playground:','playground:start'); foreach($tests as $test){