summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_test/cases/inc/auth_nameencode.test.php5
-rw-r--r--_test/cases/inc/utf8_substr.test.php4
2 files changed, 7 insertions, 2 deletions
diff --git a/_test/cases/inc/auth_nameencode.test.php b/_test/cases/inc/auth_nameencode.test.php
index 926937a09..1e29b77fd 100644
--- a/_test/cases/inc/auth_nameencode.test.php
+++ b/_test/cases/inc/auth_nameencode.test.php
@@ -5,6 +5,11 @@ require_once DOKU_INC.'inc/auth.php';
class auth_nameencode_test extends UnitTestCase {
+ function teardown() {
+ global $cache_authname;
+ $cache_authname = array();
+ }
+
function test_simple(){
$in = 'hey$you';
$out = 'hey%24you';
diff --git a/_test/cases/inc/utf8_substr.test.php b/_test/cases/inc/utf8_substr.test.php
index 5cb93034a..f3bf1b154 100644
--- a/_test/cases/inc/utf8_substr.test.php
+++ b/_test/cases/inc/utf8_substr.test.php
@@ -30,9 +30,9 @@ class utf8_substr_test extends UnitTestCase {
// we test multiple cases here - format: in, offset, length, out
$tests = array();
- $str = str_pad('',strlen('в')*66000,'в').'@@';
+ $str = str_repeat('в',66000).'@@';
$tests[] = array($str, 65600, 1, 'в');
- $tests[] = array($str,0,66000,$str);
+ $tests[] = array($str,0,66002,$str);
foreach($tests as $test){
$this->assertEqual(utf8_substr($test[0],$test[1],$test[2]),$test[3]);