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 require_once './libraries/string.lib.php';
39 * @package phpMyAdmin-test
41 class PMA_STR_sub_test
extends PHPUnit_Framework_TestCase
43 public function testMultiByte()
45 $this->assertEquals('čšě',
46 PMA_substr('čšěčščěš', 0, 3));