diff options
author | chris <chris@jalakai.co.uk> | 2006-08-27 20:33:27 +0200 |
---|---|---|
committer | chris <chris@jalakai.co.uk> | 2006-08-27 20:33:27 +0200 |
commit | dc2c0e04646a8bbd31f08140918d61d1dda25c2e (patch) | |
tree | f419fd1140e9eec5d2bdb7399c82117a5838d116 /_test | |
parent | 6e0cc83a924bf9b5f90ae80f11ccdcf58ee415a7 (diff) | |
download | rpg-dc2c0e04646a8bbd31f08140918d61d1dda25c2e.tar.gz rpg-dc2c0e04646a8bbd31f08140918d61d1dda25c2e.tar.bz2 |
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
Diffstat (limited to '_test')
-rw-r--r-- | _test/cases/inc/pageutils_clean_id.test.php | 6 |
1 files changed, 6 insertions, 0 deletions
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]); } |