From aac682fbd0885f612fad6f82d8ac71573e80786f Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sun, 2 Mar 2008 19:45:14 +0100 Subject: Fix Unit Test - README: test unit is under _test/ - form: use security token - form: reordered elements - pageid: playground start page (broken since ns autolinking?) darcs-hash:20080302184514-19e2d-087390c75f1e60e369162219f253a7ed513ce1f6.gz --- _test/README | 2 +- _test/cases/inc/form_form.test.php | 13 ++++++++----- _test/cases/inc/pageutils_resolve_pageid.test.php | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/_test/README b/_test/README index d651a4a82..099290a0d 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 0c59d4a85..7a5913bf8 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 = '
'; $realoutput .= "\n"; - $realoutput .= '
'; + $realoutput .= '
'; + $realoutput .= '
'; $realoutput .= "\n"; $realoutput .= "
Test\n"; $realoutput .= '
'; + $realoutput .= '
'; $realoutput .= "\n"; $realoutput .= ''; $realoutput .= "\n"; - $realoutput .= ''; + $realoutput .= ''; $realoutput .= "\n"; - $realoutput .= ''; + $realoutput .= ''; $realoutput .= "\n"; $realoutput .= "
\n
\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 ab282b57a..738a7d2aa 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){ -- cgit v1.2.3