Translation update done using Pootle.
[phpmyadmin-themes.git] / test / PMA_STR_sub_test.php
blob7900b9262a58d8130e014b894e4fcd24bb9cbdbe
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * tests for PMA_pow()
6 * @package phpMyAdmin-test
7 */
9 /**
12 require_once 'PHPUnit/Framework.php';
14 $match = array();
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])) {
19 $match[2] = 0;
21 if (! isset($match[3])) {
22 $match[3] = 0;
24 /**
25 * @ignore
27 define('PMA_PHP_INT_VERSION',
28 (int) sprintf('%d%02d%02d', $match[1], $match[2], $match[3]));
29 } else {
30 /**
31 * @ignore
33 define('PMA_PHP_INT_VERSION', 0);
36 $GLOBALS['charset'] = 'UTF-8';
38 require_once './libraries/string.lib.php';
40 /**
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));