Aleksander Machniak
2012-08-24 e8be303af3b3cb5187101e9d6f160e0aa8f07285
Added tests for shared functions, fixed small issues
2 files modified
9 ■■■■■ changed files
program/include/rcube_shared.inc 8 ●●●● patch | view | raw | blame | history
tests/phpunit.xml 1 ●●●● patch | view | raw | blame | history
program/include/rcube_shared.inc
@@ -108,11 +108,11 @@
/**
 * Remove slash at the end of the string
 * Remove slashes at the end of the string
 */
function unslashify($str)
{
  return preg_replace('/\/$/', '', $str);
  return preg_replace('/\/+$/', '', $str);
}
@@ -231,7 +231,7 @@
{
    $keys = array();
    if (!empty($array)) {
    if (!empty($array) && is_array($array)) {
        foreach ($array as $key => $child) {
            $keys[] = $key;
            foreach (array_keys_recursive($child) as $val) {
@@ -255,7 +255,7 @@
/**
 * Remove single and double quotes from given string
 * Remove single and double quotes from a given string
 *
 * @param string Input value
 *
tests/phpunit.xml
@@ -7,6 +7,7 @@
            <file>MailDecode.php</file>
            <file>MailFunc.php</file>
            <file>ModCss.php</file>
            <file>Shared.php</file>
            <file>Utils.php</file>
            <file>VCards.php</file>
        </testsuite>