diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-02-15 16:57:04 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-02-15 16:57:26 +0100 |
commit | 04180aa92fd6a23e4a6c154bc248e7b09d60d21d (patch) | |
tree | fcae995132eb801cc3ff7a24f2d045f8c4c07bbb /_test | |
parent | fd687c182623383b66d845d9d010dfa905d3971d (diff) | |
download | rpg-04180aa92fd6a23e4a6c154bc248e7b09d60d21d.tar.gz rpg-04180aa92fd6a23e4a6c154bc248e7b09d60d21d.tar.bz2 |
unit test for FS#2173
Diffstat (limited to '_test')
-rw-r--r-- | _test/tests/inc/utf8_strtolower.test.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/_test/tests/inc/utf8_strtolower.test.php b/_test/tests/inc/utf8_strtolower.test.php new file mode 100644 index 000000000..85f5b270b --- /dev/null +++ b/_test/tests/inc/utf8_strtolower.test.php @@ -0,0 +1,23 @@ +<?php +// use no mbstring help here +if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1); + +class utf8_strtolower_test extends DokuWikiTest { + + function test_givens(){ + $data = array( + 'Αρχιτεκτονική Μελέτη' => 'αρχιτεκτονική μελέτη', // FS#2173 + ); + + foreach($data as $input => $expected) { + $this->assertEquals($expected, utf8_strtolower($input)); + } + + // just make sure our data was correct + if(function_exists('mb_strtolower')) { + foreach($data as $input => $expected) { + $this->assertEquals($expected, mb_strtolower($input, 'utf-8')); + } + } + } +}
\ No newline at end of file |