Annotation of embedaddon/php/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: mysqli_dump_debug_info()
                      3: --SKIPIF--
                      4: <?php
                      5: require_once('skipif.inc');
                      6: require_once('skipifemb.inc');
                      7: require_once('skipifconnectfailure.inc');
                      8: ?>
                      9: --FILE--
                     10: <?php
                     11:        require_once("connect.inc");
                     12: 
                     13:        $tmp    = NULL;
                     14:        $link   = NULL;
                     15: 
                     16:        if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
                     17:                printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket);
                     18: 
                     19:        if (NULL !== ($tmp = @$mysqli->dump_debug_info($link)))
                     20:                printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
                     21: 
                     22:        if (!is_bool($tmp = $mysqli->dump_debug_info()))
                     23:                printf("[003] Expecting boolean/[true|false] value, got %s/%s, [%d] %s\n",
                     24:                        gettype($tmp), $tmp,
                     25:                        $mysqli->errno, $mysqli->error);
                     26: 
                     27:        $mysqli->close();
                     28: 
                     29:        if (NULL !== ($tmp = $mysqli->dump_debug_info()))
                     30:                printf("[004] Expecting NULL, got %s/%s, [%d] %s\n",
                     31:                        gettype($tmp), $tmp,
                     32:                        $mysqli->errno, $mysqli->error);
                     33: 
                     34:        print "done!";
                     35: ?>
                     36: --EXPECTF--
                     37: Warning: mysqli::dump_debug_info(): Couldn't fetch mysqli in %s on line %d
                     38: done!

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>