2 /* vim: expandtab sw=4 ts=4 sts=4: */
7 * @package phpMyAdmin-test
13 require_once 'PHPUnit/Framework.php';
16 preg_match('@^([0-9]{1,2})(?:.([0-9]{1,2})(?:.([0-9]{1,2}))?)?@',
17 phpversion(), $match);
18 if (isset($match) && ! empty($match[1])) {
19 if (! isset($match[2])) {
22 if (! isset($match[3])) {
25 define('PMA_PHP_INT_VERSION',
26 (int) sprintf('%d%02d%02d', $match[1], $match[2], $match[3]));
28 define('PMA_PHP_INT_VERSION', 0);
31 $GLOBALS['charset'] = 'UTF-8';
33 require_once './libraries/string.lib.php';
35 class PMA_STR_sub_test
extends PHPUnit_Framework_TestCase
37 public function testMultiByte()
39 $this->assertEquals('čšě',
40 PMA_substr('čšěčščěš', 0, 3));