2 /* vim: set 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])) {
28 define('PMA_PHP_INT_VERSION',
29 (int) sprintf('%d%02d%02d', $match[1], $match[2], $match[3]));
34 define('PMA_PHP_INT_VERSION', 0);
37 $GLOBALS['charset'] = 'UTF-8';
39 require_once './libraries/string.lib.php';
42 * @package phpMyAdmin-test
44 class PMA_STR_sub_test
extends PHPUnit_Framework_TestCase
46 public function testMultiByte()
48 $this->assertEquals('čšě',
49 PMA_substr('čšěčščěš', 0, 3));