public static function findCaller()
    {
        if (version_compare(PHP_VERSION, '5.3.6', '>=')) {
            $bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
        } else {
            $bt = debug_backtrace(false);
        }

        $max    = count($bt);
        $ns     = __NAMESPACE__ . '\\';
        $len    = strlen($ns);
        $ns2    = $ns . 'Tests' . '\\';
        for ($i = 0; $i < $max; $i++) {
            if (isset($bt[$i]['function']) &&
                !strncmp($ns, $bt[$i]['function'], $len) &&
                strncmp($ns2, $bt[$i]['function'], $len + 6)) {
                // Skip frames until we get out of Plop's code.
                continue;
            }

            if (isset($bt[$i]['class']) &&
                !strncmp($ns, $bt[$i]['class'], $len) &&
                strncmp($ns2, $bt[$i]['class'], $len + 6)) {
                // Skip frames until we get out of Plop's code.
                continue;
            }

            break;
        }

        if ($i == $max) {
            return array(
                'ns'    => null,
                'file'  => null,
                'line'  => 0,
                'func'  => null,
                'cls'   => null,
            );
        }

        $ns     = '';
        $func   = isset($bt[$i]['function']) ? $bt[$i]['function'] : null;
        $cls    = isset($bt[$i]['class']) ? $bt[$i]['class'] : null;
        $file   = isset($bt[$i - 1]['file']) ? $bt[$i - 1]['file'] : null;
        $line   = isset($bt[$i - 1]['line']) ? $bt[$i - 1]['line'] : 0;

        if (($pos = strrpos($func, '\\')) !== false) {
            $ns     = substr($func, 0, $pos);
            $func   = substr($func, $pos + 1);
        } elseif (($pos = strrpos($cls, '\\')) !== false) {
            $ns     = substr($cls, 0, $pos);
            $cls    = substr($cls, $pos + 1);
        }

        return array(
            'ns'    => $ns,
            'file'  => $file,
            'line'  => $line,
            'func'  => $func,
            'cls'   => $cls,
        );
    }