[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/_test/tests/inc/ -> utf8_strtolower.test.php (source)

   1  <?php
   2  // use no mbstring help here
   3  if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1);
   4  
   5  class utf8_strtolower_test extends DokuWikiTest {
   6  
   7      function test_givens(){
   8          $data = array(
   9              'Αρχιτεκτονική Μελέτη' => 'αρχιτεκτονική μελέτη', // FS#2173
  10          );
  11  
  12          foreach($data as $input => $expected) {
  13              $this->assertEquals($expected, \dokuwiki\Utf8\PhpString::strtolower($input));
  14          }
  15  
  16          // just make sure our data was correct
  17          if(function_exists('mb_strtolower')) {
  18              foreach($data as $input => $expected) {
  19                  $this->assertEquals($expected, mb_strtolower($input, 'utf-8'));
  20              }
  21          }
  22      }
  23  }