2 /* vim: set expandtab sw=4 ts=4 sts=4: */
6 * @package phpMyAdmin-test
12 require_once 'PHPUnit/Framework.php';
15 preg_match('@^([0-9]{1,2})(?:.([0-9]{1,2})(?:.([0-9]{1,2}))?)?@',
16 phpversion(), $match);
17 if (isset($match) && ! empty($match[1])) {
18 if (! isset($match[2])) {
21 if (! isset($match[3])) {
27 define('PMA_PHP_INT_VERSION',
28 (int) sprintf('%d%02d%02d', $match[1], $match[2], $match[3]));
33 define('PMA_PHP_INT_VERSION', 0);
36 $GLOBALS['charset'] = 'UTF-8';
38 require_once './libraries/string.lib.php';
41 * @package phpMyAdmin-test
43 class PMA_STR_sub_test
extends PHPUnit_Framework_TestCase
45 public function testMultiByte()
47 $this->assertEquals('čšě',
48 PMA_substr('čšěčščěš', 0, 3));