private static function runClass(string $className, ?string $filter): bool
    {
        echo Console::beginActionMessage($className);
        flush();
        if (!is_null($filter) && !preg_match($filter, $className)) {
            echo Console::endActionSkip();
            flush();
            return false;
        }
        try {
            $result = call_user_func(array($className, 'run'));
        } catch (\Exception $e) {
            $result = array($e->getMessage(), 'Exception catched in the test library :', 
            $e->getFile() . '(' . $e->getLine() . ')');
            if (defined('APPLICATION_ENV') && APPLICATION_ENV == 'development') {
                echo Console::endActionFail();
                echo self::exceptionToStr($e);
                exit;
            }
        }
        if ($result === false) {
            echo Console::endActionOK();
        } else if ($result === true) {
            echo Console::endActionSkip();
        } else {
            echo Console::endActionFail();
            foreach ($result as $line) {
                echo '  - ' . $line . "\n";
            }
        }
        flush();
        
        return true;
    }