From dc2c0e04646a8bbd31f08140918d61d1dda25c2e Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 27 Aug 2006 20:33:27 +0200 Subject: update cleanID and wikiFN result caches to support unit testing - move caches into global scope (they were static in function scope) - add teardown() method to clean_id unit test - to clear its cache darcs-hash:20060827183327-9b6ab-cf9beb2ca6c47142dfaad3117d7c86748a54312c.gz --- _test/cases/inc/pageutils_clean_id.test.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '_test') diff --git a/_test/cases/inc/pageutils_clean_id.test.php b/_test/cases/inc/pageutils_clean_id.test.php index 0b4f51571..9884bbc12 100644 --- a/_test/cases/inc/pageutils_clean_id.test.php +++ b/_test/cases/inc/pageutils_clean_id.test.php @@ -4,6 +4,10 @@ require_once DOKU_INC.'inc/pageutils.php'; class init_clean_id_test extends UnitTestCase { + function teardown() { + global $cache_cleanid; + $cache_cleanid = array(); + } function test_default(){ // we test multiple cases here @@ -39,6 +43,8 @@ class init_clean_id_test extends UnitTestCase { $tests = array(); $tests[] = array('page/page',false,'page:page'); + $this->teardown(); + foreach($tests as $test){ $this->assertEqual(cleanID($test[0],$test[1]),$test[2]); } -- cgit v1.2.3